I want to bind a datasource to my Report on Reports designer.
How do i do that using Javacript? I haven't found docs for datasource binding.
What i found is the following code, but the datasource wont appear on the screen. It just appears after i add another manually using the interface. Its like I'm missing a "refresh" command.
Code: Select all
// Create new DataSet object
var dataSet = new Stimulsoft.System.Data.DataSet("teste123");
// Load JSON data file from specified URL to the DataSet object
dataSet.readJsonFile("files/reports/SimpleData.json");
// Remove all connections from the report template
report.dictionary.databases.clear();
// Register DataSet object
report.regData("teste123", "teste123", dataSet);
report.dictionary.synchronize();