public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReporteDeVentas rpt = new ReporteDeVentas();

            rpt.Site = this.Site;
            return(rpt);
        }
Example #2
0
        public void CargarDatos(TicketsBL ticketsBL, ClientesBL clientesBL)
        {
            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from p in ticketsBL.ListaDeTickets
                select new
            {
                Id       = p.Id,
                Fecha    = p.Fecha,
                Cliente  = clientesBL.ListadeClientes.FirstOrDefault(r => r.Id == p.ClienteId).Nombre,
                Subtotal = p.Subtotal,
                Impuesto = p.Impuesto,
                Total    = p.Total
            };

            var reporteVentas = new ReporteDeVentas();

            reporteVentas.SetDataSource(bindingSource);

            crystalReportViewer1.ReportSource = reporteVentas;
            crystalReportViewer1.RefreshReport();
        }