Render the report in JavaScript and export it directly from code, without opening the viewer.

Exporting the document. Load and render the report, configure the requested export format, and deliver the generated bytes as a file, stream, or web response.
var report = new Stimulsoft.Report.StiReport();
report.loadFile("../reports/SimpleList.mrt");
report.renderAsync(function () { });

function saveReportPdf() {
    report.exportDocumentAsync(function (pdfData) {
        var fileName = report.reportAlias;
        Stimulsoft.System.StiObject.saveAs(pdfData, fileName + ".pdf", "application/pdf");
    }, Stimulsoft.Report.StiExportFormat.Pdf);
}
exportDocumentAsync exports the rendered report to the format given by StiExportFormat and returns the data in a callback. The helper Stimulsoft.System.StiObject.saveAs then prompts the browser to download the file.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.