Loading the Report
Our sample projects and report templates can help you learn the basics of working with our products.The foundation of Reports.JS is the StiReport object: you create it, load a template, and render it in the browser.
Loading the template. Create the report, load the template from the demonstrated source, and pass it to the next rendering, viewing, or export step.
Loading the template. Create the report, load the template from the demonstrated source, and pass it to the next rendering, viewing, or export step.
var report = new Stimulsoft.Report.StiReport();
report.loadFile("../reports/SimpleList.mrt");
report.renderAsync(function () {
document.write("Rendered page count: " + report.renderedPages.count);
});loadFile loads a report template (.mrt), and renderAsync builds the document without blocking the browser, invoking the callback when it is ready. After rendering, report.renderedPages holds the finished pages — the base for viewing, printing or exporting.