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

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        private void ShowReport()
        {
            var rp = new Reports.crApendice09_Drogas();

            var result = new ServiceBL().GetReportCocainaMarihuana(_serviceId, Constants.TOXICOLOGICO_COCAINA_MARIHUANA_ID);

            if (result == null)
            {
                MessageBox.Show("No hay impresión disponible", "Información");
                return;
            }
            var ds1 = new DataSet();

            var dt = BLL.Utils.ConvertToDatatable(result);

            dt.TableName = "dtAutorizacionDosajeDrogas";

            ds1.Tables.Add(dt);

            rp.SetDataSource(ds1);

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