public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ReporteCompras rpt = new ReporteCompras(); rpt.Site = this.Site; return(rpt); }
private void button1_Click(object sender, EventArgs e) { var fechainicial = dateTimePicker1.Value; var fechafinal = dateTimePicker2.Value; var bindingSource = new BindingSource(); bindingSource.DataSource = _comprasBL.ObtenerCompras(fechainicial, fechafinal); var reporte = new ReporteCompras(); reporte.SetDataSource(bindingSource); crystalReportViewer1.ReportSource = reporte; crystalReportViewer1.RefreshReport(); }