Data can be registered for the report from code just before it renders, using the onBeforeRender event that runs on the client.
$report = new StiReport();
$report->onBeforeRender = 'onBeforeRender';
$viewer->process();
$report->loadFile('../reports/SimpleList.mrt');
$viewer->report = $report;

function onBeforeRender(args) {
    let dataSet = new Stimulsoft.System.Data.DataSet("Demo");
    dataSet.readJson(jsonData);
    args.report.dictionary.databases.clear();
    args.report.regData("Demo", "Demo", dataSet);
}



The event name is set in PHP and the handler runs in the browser, where it builds a dataset and registers it with regData before the report is rendered.

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.