Problem with JSON file datasource

1 Answer 32 Views
Binding
SIEN
Top achievements
Rank 1
Iron
Iron
SIEN asked on 13 Feb 2025, 10:57 AM | edited on 13 Feb 2025, 02:07 PM

Hi, I'm developing a report with standalone designer (version 18.2.24.824) with a JSON Data Source. When I put my JSON inline, no problem. But when I follow this instructions, I have no data (I bind my data source on a table). No errors, but no data.

The content of the JSON file :

{"eleves":[{"numero":1,"nom":"Toto","prenom":"Toto "},{"numero":2,"nom":"Tata","prenom":"Tata "},{"numero":3,"nom":"Tutu","prenom":"Tutu "}]}

 

On my data source, I set the property "Data Selector" as "eleves".

I create a report parameter named "DataSourceFileName".

I run the report (from an ASP.NET Core app) with the follwing value for the parameter : @"c:\\temp\\Telerik report\\Data\\data.json"

My Table in the report has following parameters :

  • DataSource : ListeElevesDataSource [Telerik.Reporting.JsonDataSource]
  • Telerik.Reporting.Binding : 
  •     Path : DataSource.Source
  •     Expression : GetUri(Parameters.DataSourceFileName.Value, "Absolute")

 

Any advice ? Thank you

 

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
SIEN
Top achievements
Rank 1
Iron
Iron
answered on 13 Feb 2025, 02:08 PM

I answer myself. The expression to use is " = Uri(Parameters.DataSourceFileName.Value, "absolute")"

The function is Uri() and not GetUri().

It will be good to correct the page I mention in my question.

Tags
Binding
Asked by
SIEN
Top achievements
Rank 1
Iron
Iron
Answers by
SIEN
Top achievements
Rank 1
Iron
Iron
Share this question
or