Registering Data when Creating a New Dashboard
Our sample projects and report templates can help you learn the basics of working with our products.When a user creates a new dashboard 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 dashboard dictionary, synchronize the schema, and render with the supplied records.
Preparing the data. Read or create the data source, register it in the dashboard 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.regData("Demo", "Demo", dataSet);
args.report.dictionary.synchronize();
}The handler runs whenever a new dashboard is created, registering a dataset so authors start with the right data.