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

            rpt.Site = this.Site;
            return(rpt);
        }
Esempio n. 2
0
        public FileStreamResult OpenIncidents()
        {
            Reports.OpenReports report = new Reports.OpenReports();
            report.Load();

            API.ReportsController reportsController = new API.ReportsController();

            report.SetDataSource(reportsController.GetUserReports(80).ToList());

            reportsController.Dispose();

            Stream reportStream = report.ExportToStream(ExportFormatType.PortableDocFormat);

            report.Close();
            report.Dispose();

            return(new FileStreamResult(reportStream, "application/pdf"));
        }