Exemplo n.º 1
0
        public IActionResult PrintReport()
        {
            StiReport report = StiNetCoreViewer.GetReportObject(this);

            // Some actions with report when printing

            return(StiNetCoreViewer.PrintReportResult(this, report));
        }
Exemplo n.º 2
0
        public IActionResult ExportReport()
        {
            StiReport        report     = StiNetCoreViewer.GetReportObject(this);
            StiRequestParams parameters = StiNetCoreViewer.GetRequestParams(this);

            // Some actions with report when exporting
            report.ReportName  = "MyReportName";
            report.ReportAlias = report.ReportName;

            if (parameters.ExportFormat == StiExportFormat.Pdf)
            {
                // Change some export settings when exporting to PDF
                StiPdfExportSettings settings = (StiPdfExportSettings)StiNetCoreViewer.GetExportSettings(this);
                settings.CreatorString = "My Company";

                return(StiNetCoreViewer.ExportReportResult(this, report, settings));
            }

            return(StiNetCoreViewer.ExportReportResult(this, report));
        }