Showing the Dashboard Viewer on the Web Page
Our sample projects and report templates can help you learn the basics of working with our products.A dashboard is a report created with
Create the viewer and load a dashboard.
How it works. Dashboards reuse the report engine, so the same viewer renders them in the browser and rebuilds whenever a new dashboard is assigned.
createNewDashboard(); the JavaScript viewer renders it on the page and can switch dashboards on demand.Create the viewer and load a dashboard.
var viewer = new Stimulsoft.Viewer.StiViewer(new Stimulsoft.Viewer.StiViewerOptions(), "StiViewer", false);
var report = Stimulsoft.Report.StiReport.createNewDashboard();
report.loadFile("../dashboard/Christmas.mrt");
viewer.report = report;
viewer.renderHtml(); // render into the target elementStiReport.createNewDashboard()— creates a dashboard-type report bound to the viewer.- Reassigning
report.loadFile(...)+viewer.report = reportswaps the shown dashboard at run time.
How it works. Dashboards reuse the report engine, so the same viewer renders them in the browser and rebuilds whenever a new dashboard is assigned.