Saving the Rendered Report to a File
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.A rendered report can be saved as a document file (.mdc) so it can be reloaded later without re-rendering.
Saving the template. Load or edit the report, handle the save action, serialize the updated template, and write or return it through the application workflow.
На скриншоте ниже Вы можете увидеть результат выполнения данного кода:

Saving the template. Load or edit the report, handle the save action, serialize the updated template, and write or return it through the application workflow.
var report = new Stimulsoft.Report.StiReport();
report.loadFile("../reports/SimpleList.mrt");
report.renderAsync(function () { });
function saveReportDocument() {
var json = report.saveDocumentToJsonString();
var fileName = report.reportAlias;
Stimulsoft.System.StiObject.saveAs(json, fileName + ".mdc", "application/json;charset=utf-8");
}saveDocumentToJsonString serializes the rendered document (not the template) to a string. Saved as an .mdc file, it can be loaded later with loadDocumentFile to display the exact same result instantly.На скриншоте ниже Вы можете увидеть результат выполнения данного кода:
