Registering a Data for the Dashboard
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.Data can be attached to a dashboard from code — here a JSON file is parsed and registered before the dashboard is shown.
Load, then parse and register JSON.
How it works. The dashboard elements resolve their expressions against the registered data, so one template works with any compatible JSON source.
На скриншоте ниже Вы можете увидеть результат выполнения данного кода:

Load, then parse and register JSON.
this.Report = StiReport.CreateNewDashboard();
this.Report.Load("Dashboards/Dashboard.mrt");
var jsonBytes = System.IO.File.ReadAllBytes("Dashboards/Demo.json");
var dataSet = StiJsonConnector.Get().GetDataSet(new StiJsonOptions(jsonBytes));
this.Report.Dictionary.Databases.Clear();
this.Report.RegData("Demo", "Demo", dataSet);StiJsonConnector.Get().GetDataSet(new StiJsonOptions(bytes))— parses JSON into aDataSet.Databases.Clear()+RegData(name, alias, data)— drop the template connections and bind the new data.
How it works. The dashboard elements resolve their expressions against the registered data, so one template works with any compatible JSON source.
На скриншоте ниже Вы можете увидеть результат выполнения данного кода:
