In an ASP.NET Core MVC app the controller builds the dashboard and returns it to the viewer — here the data comes from a JSON file rather than the template.

Load the dashboard and register JSON data. In the GetReport action:
var report = StiReport.CreateNewDashboard();
report.Load(StiNetCoreHelper.MapPath(this, "Dashboards/Dashboard.mrt"));

var jsonBytes = System.IO.File.ReadAllBytes(StiNetCoreHelper.MapPath(this, "Dashboards/Demo.json"));
var dataSet = StiJsonConnector.Get().GetDataSet(new StiJsonOptions(jsonBytes));

report.Dictionary.Databases.Clear();
report.RegData("Demo", "Demo", dataSet);

return StiNetCoreViewer.GetReportResult(this, report);

How it works. The dashboard is assembled server-side on each request, so its data can come from anywhere the controller can reach.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.