Registering Data when Creating a New Dashboard
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.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.