Reporting Parameter binding HTML Viewer

1 Answer 40 Views
DataSource SQL Report Parameters Report Viewer - HTML5
Top achievements
Rank 1
Stephen asked on 27 Jan 2022, 09:27 AM | edited on 27 Jan 2022, 09:29 AM

How does parameter binding in the HTML reporting control - when using report parameters and datasource parameters. 

I have a file that works 100% in the designer - where the report parameters are linked to the datasource parameters ( FWIW - using postgres so no name parameters - they are ? in the query source). 

I have 2 parameters per query...   and they are bound to the Report parameters.

So each query has a section like this in the designer.

I am using the reports controller to return the report to the client...    but when using the html version -  the parameter binding doesn't seem to work and this i end up with syntax errors -  as it looks like the ?  is never replaced in the query.

The report parameters section renders fine..  and will match what i set via the parameters object. 

Using fiddler i can see the post to the below URL  setting my param to the values I choose..


But the query still fails with syntax error ( that doesn't happen in the designer).

I was hoping to leave "parameters"  blank -   since I dont want to set them independently of the reports parameters section. 

If I leave it blank...  the post to http://localhost/reporting/api/reports/clients/acb333b0fd4/instances  shows the default parameters from the parameters area...   but i still get syntax error. 

We are serving the report via a custom resolver returning the actual trdx file...    and it does contain the section i expect - which maps report parameter to query parameter... 




I don't know how to resolve or move forward -   any advise on how to resolve or what else i can post to try and assist diagnosing the issue ?








1 Answer, 1 is accepted

Sort by
Telerik team
answered on 01 Feb 2022, 07:37 AM

Hello Steve,

I noticed that this is a duplicate of support ticket #1551278 that I have already replied to. I will paste my reply here:

If I understood correctly, the Report Parameters are linked with the corresponding SqlDataSource parameters in the report definition and are properly sent to the database from the Standalone Report Designer. When passing the parameters from the Html5 viewer there is a syntax error related to parameter values not being provided.

Note that generally, we delegate all the work related to connecting to the database and fetching the data to the specified ADO.NET provider. We transfer the errors that occur in the data provider/database to the user. I suspect that the syntax error has occurred in the data provider or the database.

The problem seems to happen although you have assured that the values are correctly passed from the viewer to the REST Service (ReportsController). Note that when you leave the parameter values passed from the viewer blank, the default behavior is to apply the values that are set in the report definition. That said, the observed behavior when skipping to pass parameter values from the viewer is expected.

Based on the above, I suspect that the problem arises server-side rather than from the viewer. I noticed that you use ASP.NET Core. If so, you probably use a different data provider than the one used by the designer that is a .NET application. Hence, one of the possibilities is that the provider from .NET Core behaves differently. Which provider do you use for your application? Can you use a database profiler to see what is the actual query that reaches the database?

Another potential reason for the problem may be related to the custom ReportSource resolver. As far as I understood, you use such to return the report as a TRDX file. Can you elaborate on the exact implementation of the resolver? Note that the Report Parameter values may be replaced there, as explained in the article section How does the REST Service know which report definition to use and what parameter values to apply?

I'm afraid that based on the available information I cannot say much more. To summarize, I suspect that the problem may come either from the ADO.NET provider that we use internally to connect to the database, or to the custom resolver.

You may also attach a trace listener to the application - Troubleshooting reporting implementation into ASP.NET Core application. I hope it will log more details on the issue.

Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at
DataSource SQL Report Parameters Report Viewer - HTML5
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question