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.
Depending on the data source format, fill-in the details in the New Data Source dialog, as follows:
• Embed the data in report:
◦ Set Embedded field to True.
◦ In Embedded Content field, click 'Load from file' and navigate to a valid json file.
• Use data from external file:
◦ Set Embedded field to False.
◦ In Content URI field, you can either connect to a local json file or a JSON web service as:
▪ Local JSON source: Click 'Open file' and navigate to a valid json file. The generated connection string looks like:
▪ JSON web service: Enter the web service URL directly. 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.