Exemple #1
0
        private void ShowReport()
        {
            OperationResult objOperationResult = new OperationResult();

            rp = new Reports.crConsolidadoCargoHistorias();
            //var rp = new Reports.crCargoHistoria();

            var       aptitudeCertificate = ListaCargoHistorias;
            DataSet   ds1 = new DataSet();
            DataSet   ds2 = new DataSet();
            DataTable dt  = Sigesoft.Node.WinClient.BLL.Utils.ConvertToDatatable(aptitudeCertificate);

            dt.TableName = "dtCargoHistorias";

            ds1.Tables.Add(dt);

            //rp.SetDataSource(ds1);

            //crystalReportViewer1.ReportSource = rp;
            //crystalReportViewer1.Show();

            rp.Subreports["crCargoHistoria.rpt"].SetDataSource(ds1);
            rp.Hoja1.SectionFormat.EnableSuppress = false;

            //rp.Subreports["crCargoHistoria2.rpt"].SetDataSource(ds1);
            //rp.Hoja2.SectionFormat.EnableSuppress = false;

            crystalReportViewer1.EnableDrillDown = false;
            var Path = Application.StartupPath;

            rp.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Path + @"\ReporteCargoHistoria.pdf");
            crystalReportViewer1.ReportSource = rp;
            crystalReportViewer1.Show();
        }
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crConsolidadoCargoHistorias rpt = new crConsolidadoCargoHistorias();

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