This example renders a report and exports it to HTML — either receiving the HTML string for display in the page, or saving it as a file.

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 saveReportHtml() {
    report.exportDocumentAsync(function (htmlString) {
        var fileName = report.reportAlias;
        Stimulsoft.System.StiObject.saveAs(htmlString, fileName + ".html", "text/html;charset=utf-8");
    }, Stimulsoft.Report.StiExportFormat.Html);
}
The export callback receives the HTML as a string, which you can insert into the page or, as here, download as a file. Passing a different StiExportFormat value exports to PDF, Excel, Word and other formats with the same call.

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