When a user creates a new report in the designer, you can automatically register data for it through the onCreateReport event.

Preparing the data. Read or create the data source, register it in the report dictionary, synchronize the schema, and render with the supplied records.
$designer->onCreateReport = 'onCreateReport';
$designer->process();

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



The handler runs in the browser whenever a new report is created, registering a dataset and synchronizing the dictionary so authors always start with the right data available.

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.