Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CRTicketCorte rpt = new CRTicketCorte();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        public verReporte(DataTable DT, DataTable DT2, DataTable DT3)
        {
            InitializeComponent();
            //Crear Objeto REPORTE
            //CRTicketVenta RP = new CRTicketVenta();
            CRTicketCorte RP = new CRTicketCorte();

            crystalReportViewer1.ReportSource = RP;
            RP.Refresh();
            if (DT2 != null)
            {
                RP.Subreports[0].SetDataSource(DT);
                RP.Subreports[1].SetDataSource(DT2);
                RP.Subreports[2].SetDataSource(DT3);
            }
            //Asignar datos al reporte
            //Asignar reporte creado al visor de reportes
            // RP.PrintToPrinter(1, false, 0, 0);


            //  RP2.SetDataSource(DT2);

            //RP.Subreports[1].SetDataSource(DT);
            crystalReportViewer1.ReportSource = RP;
            RP.PrintToPrinter(1, false, 0, 0);
        }
Exemplo n.º 3
0
        public verReporte(DataTable DT, DataTable DT2, DataTable DT3, DataTable DT4, DataTable DT5)
        {
            InitializeComponent();
            //Crear Objeto REPORTE

            if (DT2 == null)
            {
                cambios       cam = new cambios();
                CRTicketVenta RP  = new CRTicketVenta();

                RP.SetDataSource(DT);
                RP.SetParameterValue("Titulo", cam.TituloTicket);
                RP.SetParameterValue("Linea1", cam.Linea1);
                RP.SetParameterValue("Linea2", cam.Linea2);
                RP.SetParameterValue("Linea3", cam.Linea3);
                //this.crystalReportViewer1.ReportSource = RP;
                RP.PrintToPrinter(1, false, 0, 0);
            }

            else if (DT2 != null)
            {
                CRTicketCorte RP = new CRTicketCorte();
                RP.SetDataSource(DT4);
                crystalReportViewer1.ReportSource = RP;
                RP.Refresh();
                if (DT2 != null)
                {
                    RP.Subreports[1].SetDataSource(DT);
                    RP.Subreports[2].SetDataSource(DT2);
                    RP.Subreports[3].SetDataSource(DT3);
                    RP.Subreports[0].SetDataSource(DT5);
                }
                RP.SetParameterValue("idSocio", 49);
                crystalReportViewer1.ReportSource = RP;
                // RP.PrintToPrinter(1, false, 0, 0);
            }


            //Asignar datos al reporte
            //Asignar reporte creado al visor de reportes



            //  RP2.SetDataSource(DT2);

            //RP.Subreports[1].SetDataSource(DT);
        }