public void CargarDatos(FacturaBL facturaBL, Datos_ClientesBL datos_ClientesBL)

        {
            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from f in facturaBL.ListadeFacturas
                select new
            {
                Id            = f.Id,
                Fecha         = f.Fecha,
                ClienteId     = f.ClienteId,
                Datos_Cliente = datos_ClientesBL
                                .ListaClientes
                                .FirstOrDefault(r => r.Id == f.ClienteId)
                                .Nombre,
                Subtotal = f.Subtotal,
                Impuesto = f.Impuesto,
                Total    = f.Total,
            };

            var reporte = new ReporteFactura();

            reporte.SetDataSource(bindingSource);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }
Ejemplo n.º 2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReporteFactura rpt = new ReporteFactura();

            rpt.Site = this.Site;
            return(rpt);
        }