You are on page 1of 12

Creación de Reportes

utilizando Microsoft Visual


Studio 2008 y Crystal
Reports 2008

Eduardo Rivera
eriveraa@gmail.com
http://eriveraa.wordpress.com
Agregar nuevo reporte en
blanco al proyecto actual
Nuevo reporte creado
Conectarse a la BD
Agregar las tablas disponibles
para el informe
Crear campo de fórmula
Arrastrar campos al informe
Vista Previa
Agregar un control
CrystalReportViewer en un
formulario
Programar el evento Load
del Formulario
namespace Windows_Ejemplos
{
public partial class ReporteDeProductos : Form
{
public ReporteDeProductos()
{
InitializeComponent();
}

private void ReporteDeProductos_Load(object sender, EventArgs e)


{
// Cargar el reporte dinámicamente
CrystalDecisions.CrystalReports.Engine.ReportDocument doc =
new CrystalDecisions.CrystalReports.Engine.ReportDocument();

// Establecer la ruta del archivo del reporte


string ArchivoReporte = Application.StartupPath + "\\rptReporteDeProductos.rpt";

// Cargar el reporte
doc.Load(ArchivoReporte);

// Asociar el reporte cargado al visualizador


this.crystalReportViewer1.ReportSource = doc;
}
}
}
Creación del parámetro
Asociar el parámetro a un
campo

You might also like