Registering a JSON Data for the Dashboard Template
Our sample projects and report templates can help you learn the basics of working with our products.A JSON file can be embedded into the dashboard as a resource, so the template carries its own data.
Add the JSON as a dictionary resource.
How it works. The JSON travels inside the dashboard's dictionary, so the template is self-contained and needs no external data request.
Add the JSON as a dictionary resource.
var report = Stimulsoft.Report.StiReport.createNewDashboard();
var content = Stimulsoft.System.IO.File.getFile("../dashboard/Demo.json");
var resource = new Stimulsoft.Report.Dictionary.StiResource(
"DemoName", "DemoAlias", false,
Stimulsoft.Report.Dictionary.StiResourceType.Json, content);
report.dictionary.resources.add(resource);
designer.report = report;StiResource(name, alias, false, StiResourceType.Json, content)— wraps the JSON file as a report resource.report.dictionary.resources.add(resource)— embeds it so the dashboard renders from the bundled data.
How it works. The JSON travels inside the dashboard's dictionary, so the template is self-contained and needs no external data request.