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 attached to a dashboard at run time — here a JSON file is parsed and bound to the template before it is shown.
Parse JSON and register it.
How it works. The dashboard elements resolve their expressions against the registered data, so the same template works with any compatible JSON source.
Parse JSON and register it.
var report = StiReport.CreateNewDashboard();
report.Load("Dashboards\\Dashboard.mrt");
var jsonBytes = File.ReadAllBytes("Dashboards\\Demo.json");
var dataSet = StiJsonConnector.Get().GetDataSet(new StiJsonOptions(jsonBytes));
report.RegData(dataSet);
report.Dictionary.Synchronize();StiJsonConnector.Get().GetDataSet(new StiJsonOptions(bytes))— parses JSON into aDataSet.RegData+Dictionary.Synchronize()— bind the data and generate matching fields.
How it works. The dashboard elements resolve their expressions against the registered data, so the same template works with any compatible JSON source.