Registering a Data for Dashboard Template
Our sample projects and report templates can help you learn the basics of working with our products.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.