Register JSON Data File and Synchronize Dictionary
Our sample projects and report templates can help you learn the basics of working with our products.A report with an empty data dictionary can be filled from a JSON file, building the data structure automatically.
Preparing the data. Read or create the data source, register it in the report dictionary, synchronize the schema, and render with the supplied records.
Preparing the data. Read or create the data source, register it in the report dictionary, synchronize the schema, and render with the supplied records.
var viewer = new Stimulsoft.Viewer.StiViewer(null, "StiViewer", false);
var report = new Stimulsoft.Report.StiReport();
report.loadFile("../reports/SimpleListEmptyDictionary.mrt");
report.regJsonFile("Demo", "../reports/Demo.json", true);
viewer.report = report;
viewer.renderHtml();regJsonFile registers a JSON file as data; the third argument (true) synchronizes the dictionary, so the report's fields are created from the JSON structure automatically — no manual data-source setup needed.