The viewer raises events for data loading, printing, exporting and switching to the designer — hook them to customize each stage.

Subscribe to viewer events.
var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);

viewer.onBeginProcessData = function (args) {
    var ds = new Stimulsoft.System.Data.DataSet("Demo");
    ds.readJsonFile("../reports/Demo.json");
    args.report.regData("Demo", "Demo", ds);
};

viewer.onBeginExportReport = function (args) {
    if (args.format === "Html") args.settings.zoom = 2;   // 200% HTML zoom
};

viewer.onDesignReport = function (args) { alert("Design button pressed."); };

How it works. Each event exposes an args object you can inspect and modify, so the viewer's data, export and navigation behavior is fully under your control.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.