I need to generate the same report repeatedly for several values. I'm accepting these values using a multi-value parameter in a new report. I have also created a table with the original report as a subreport. How can I pass the values that the user selects in the parameter to this table? I have created a dataset, but I'm not able to bind these values to the dataset, which in turn is bound to the table. I have read several articles, however, I'm unable to get it working. Please advise.
相关问题
- Why does SSRS need to recycle the application doma
- Use multiple ReportItems in one expression in RDLC
- How to delete old subscriptions
- QUERY method of Soap request for SSRS and WCF test
- SSL/wallet error trying to access Oracle DB from S
相关文章
- SQL Server Reporting Services - Set default value
- Get list of reports from SSRS?
- SSRS tablix column CanGrow property for width?
- The report server cannot process the report or sha
- SSRS 2008 report not working with using a stored p
- Dataset with dynamic columns in tablix/matrix
- Bulk uploading images to SSRS
- how to properly display SSRS site within iframe
You bind the parameters in the main report, on the subreport object. In the sub-report, you apply those parameters to a dataset.
I finally found the solution on another stackoverflow post after struggling for a few days.
Reproducing it here:
To do this you would have to put the subreport into a list or tablix. As far as I know there's no easy way to have that list or tablix iterate over the values in a multi-valued parameter. It will only accept a dataset.
So the only workaround I can think of involves splitting the parameter into a set of rows in a dataset, which is possible but not trivial with SQL. However, if the available values for the parameter come from a dataset the situation would improve: you can just hook the tablix/list to your dataset and filter items that aren't selected in the parameter.
Edit: I've found a slightly hackish solution to expanding a multi-valued parameter into a dataset, by building the dataset query as an expression. Assuming a parameter @MultiParamX this expression will create a query that outputs all selected values in one column:
This may generate a query such as the following (reformatted for readability):
This will generate a result set such as: