Bind a Report to JSON Data

This topic describes how to bind a report to JSON data at design time.

Create JsonDataSource

Create a new report.
Click the report's smart tag. In the invoked actions list, expand the drop-down menu for the Datasource property and click Add New Data Source...This invokes the Data Source Wizard.

Choose the JSON option and click Next.NOTE
The Report Designer's Report Wizard provides the JSON option if the application has a reference to the open-source Newtonsoft.Json library.


The next wizard page allows you to specify the location of the JSON-formatted data: Web Service Endpoint URI

File Name

String with JSON Content

On the next page, the wizard shows the specified JSON data's structure. You can choose all nodes or a subset of nodes. Uncheck the data fields that your report does not require.

You can rename data fields if necessary.

After you finish the wizard, it creates the JsonDataSource component. This component retrieves the checked data fields that the selected JSON element includes. The Field List reflects the data source structure.


Customize the JSON Data Source

Right-click the JsonDataSource component in the Field List or Report Explorer and choose Edit.... Specify another JSON data location and reconfigure data fields in the invoked wizard.


Customize the JSON Data Source Schema

Right-click the JsonDataSource component in the Report Explorer and choose Edit Schema.... Reconfigure data fields in the invoked wizard page.


Wednesday, 09 January 2019 Posted in Bind to Data