Registering a Data for Dashboard Template
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.Data can be supplied from code by loading a dataset and registering it in place of the template's connections.
Load a dataset and register it.
How it works. The dashboard resolves its elements against the registered dataset, so one template works with any compatible JSON source.
На скриншоте ниже Вы можете увидеть результат выполнения данного кода:

Load a dataset and register it.
var report = Stimulsoft.Report.StiReport.createNewDashboard();
report.loadFile("../dashboard/Dashboard.mrt");
var dataSet = new Stimulsoft.System.Data.DataSet("Demo");
dataSet.readJsonFile("../dashboard/Demo.json");
report.dictionary.databases.clear();
report.regData("Demo", "Demo", dataSet);
viewer.report = report;dataSet.readJsonFile(url)— load JSON into aDataSet.dictionary.databases.clear()+regData(name, alias, dataSet)— drop template connections and bind the new data.
How it works. The dashboard resolves its elements against the registered dataset, so one template works with any compatible JSON source.
На скриншоте ниже Вы можете увидеть результат выполнения данного кода:
