2 Answers, 1 is accepted
Hi Siva,
One way to pass the JSON data to the report is to add a report parameter of type string and bind its value to the DataSource.Source property of each data item that uses your JSON data source.
The following Knowledge Base article provides additional information about this approach.
How to set the content of JsonDataSource through report parameter
I hope this option works for you.
Best Regards,
Momchil
Progress Telerik
Hey,
We’re using the method you’ve described.
I’m trying to implement logic where a report parameter checks a data source field for the value 0
. This initially seems to work as expected. However, when I change the JSON data for the parameter value (which is passed to the data sources), the conditionals don’t update accordingly. Instead, the report still reflects the conditionals based on the original data.
The approach from (https://www.telerik.com/forums/report-desginer---hide-a-panel-in-telerik-report-designer-based-on-table-data#5892541) works, but as mentioned, it doesn’t seem to adapt when the JSON value of the report parameter changes. The report continues to use the original mapping instead of updating to the new data.
Any advice on resolving this issue?
This is the binding of a table, the parent of the table is a panel with no data source.
My original goal is to hide the panel when a value from the data source is zero. Which worked with the mentioned approach from the link I have sent.
This works, but as I said, when the json value of a report parameter changes I still see the conditionals that apply for the original data sources & not for the changed data thats get passet to the data sources.
Hello Leo,
My understanding of your scenario is as follows. You use the same JSON data source both for your table and for the available values of the parameter that checks a certain data source field for the value 0. You also have an extra string parameter you use to update the source of the table's data source through a binding, as described in the How to Set the Contents of a JsonDataSource through a Report Parameter article. Is this correct?
Assuming I got the scenario right, the reason the parameter that checks for the value 0 does not reflect the updated data is that report parameters do not support bindings, and the source of its available values cannot be updated the same way the source of the table is updated. In practice, the approach from the article I linked above does not update the main JSON data source but it updates the specific data items it is applied to, which explains why the parameter is left out.
With this in mind, it will be difficult to combine the approach from the How to Set the Contents of a JsonDataSource through a Report Parameter article and the approach from your other forum question - Report Designer - Hide a Panel in Telerik Report Designer Based on Table Data in Reporting.
Here are some alternatives I can suggest in this scenario.
- Instead of passing the dynamic JSON through a report parameter, make it accessible through an endpoint in your application and get the data using a WebServiceDataSource.
- Implement a Custom Report Source Resolver for your Reporting REST Service and use the approach from the Edit the Report Data Source Components at Runtime KB article to edit the data source globally for the entire report.
Please, look into these options and let me know what you think.

Hi Momchil
I have already tried this , while configuring the jsondatasource i cant select the parameter value to it, and it only accepts inline json data or external json file.
And also i tried to map the json in to parameter, but i cant use the value in my textbox fields, because in textbox does nt have datasource property, in that document its not clear.
Can anyone let me know if any option is there.
Hi Siva,
You are correct, the source of the JSON data source accepts only inline JSON data and external JSON files.
The workaround binds the source of the JSON data source on the data item level at runtime. For example, if we have a table that uses a JSON data source and we want to change the data of the table based on a parameter value, we need to add a binding in the table's Bindings property.
To illustrate this, I am attaching a demo solution that passes JSON data to a report from a controller. Please, examine the attached solution as well as the report inside it and let me know if any questions arise.