Setting up a connection to the data source is the first step in binding data to the report. Data source can be a local JSON file or a remote data. Once a connection is established, a dataset is required to get the data you want to show on the report.
The ActiveReportsJS supports binding to JSON data source. You can directly use JSON web services to connect to a JSON datasource, for example
Or you can use local JSON files - the json file must be in the same folder or subfolder as report, since only relative paths to data files are supported. Multiple data sources can also be added in a single report.
Follow the steps given below to bind to a json data source.
From the Data tab, click Add corresponding to Data Sources.
In the New Data Source dialog that opens, you can either -
• embed the data source:
◦ Set Embedded field to True.
◦ In Embedded Content field, click 'Load from file' and navigate to a valid json file.
• provide URI: In Content URI field:
◦ to connect to JSON web service, paste the web service URL. The generated connection string looks like:
◦ to connect to a local json file, click 'Open file' and navigate to a valid json file. The generated connection string looks like:
Click Add Data Source.
A dataset fetches data from the data source to display in a report.
Follow these steps to add a dataset.
$.customers[*]. See this link for the supported JSONPath query language.
Note: Reports bound to large datasets (embedded or external) may take longer time to render. Even if a user sets filter to reduce data to be used in report with only few pages to render, all the data is still transferred to the user, which makes rendering slow. To make browser rendering fast, it is recommended to use faster internet connection speed, and reduce the size of dataset if possible.