public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ReportedeCompras rpt = new ReportedeCompras(); rpt.Site = this.Site; return(rpt); }
public void CargarDatos(ComprasBL comprasBL) { var bindingSource = new BindingSource(); bindingSource.DataSource = from c in comprasBL.ListadeCompras select new { Id = c.Id, Fecha = c.Fecha, ProveedorId = c.ProveedorId, Proveedor = c.Proveedor, Subtotal = c.Subtotal, Total = c.Total, Activo = c.Activo, }; var reporte = new ReportedeCompras(); reporte.SetDataSource(bindingSource); crystalReportViewer1.ReportSource = reporte; crystalReportViewer1.RefreshReport(); }