Beispiel #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReporteFacturas rpt = new ReporteFacturas();

            rpt.Site = this.Site;
            return(rpt);
        }
        public FormReporteFacturas()
        {
            InitializeComponent();

            List <TextBox> BuscarTlist = new List <TextBox>();
            List <string>  BuscarSlist = new List <String>();

            BuscarTlist.Add(txtBuscarFactura);
            BuscarSlist.Add("Filtrar por número de factura");
            SetCueBanner(ref BuscarTlist, BuscarSlist);

            _FacturaBL                       = new FacturaBL();
            bindingsourceFacturas            = new BindingSource();
            bindingsourceFacturas.DataSource = _FacturaBL.ObtenerFacturas();

            _ClientesBL                      = new ClientesBL();
            bindingsourceClientes            = new BindingSource();
            bindingsourceClientes.DataSource = _ClientesBL.ObtenerClientes();

            reporte = new ReporteFacturas();
            reporte.Database.Tables[0].SetDataSource(bindingsourceFacturas);
            reporte.Database.Tables[1].SetDataSource(bindingsourceClientes);

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