The subreport item has its own SqlDataSource
that indeed can be filtered server-side based on a Report Parameter (Filter DataSource records
), which value can be passed from the main report.
The value of the filtering parameter is provided as part of the ReportSource
property of the corresponding SubReport
item in the main report (check How to: Set ReportSource for SubReport
Note that the filtering Report Parameter should be linked to the SqlDataSource
parameter used in the 'Where' clause of the SQL Query - Using Parameters with the SqlDataSource component
I have attached a sample report definition using a subreport (also attached), which SqlDataSource
is filtered server-side by the parameter value passed from the main report. The SQL Profiler indicated that the correct 'Where' clause is applied in the queries from the subreport.
My suggestion is to take a look at the set up of the sample report definitions and try to make the appropriate adjustments in the detail report that currently does not get filtered as required.
The sample reports use the AdventureWorks
database that should be available on the local machine in order the samples to work correctly. It may be necessary to update also the connection string to the database according to your local settings. Note that the AdventureWorks database gets installed with Telerik Reporting examples by default, as most of our demo reports use it as data provider.
I hope the provided information and the example would be helpful.
If the problem persists, please, send us the main and the detail reports for local investigation.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items