ssrs 2008 passing a parameter list to a subreport
reporting-services, sql-server, sql-server-2008-r2
Solution
A few things to check:
- Make sure that the parameter in the subreport is set to allow multiple values.
- Make sure you are passing the parameter from the main report to the subreport as `[@paramName]` and not `"=Parameters!ParamName.Value(0)"` as this indicates to retrieve only the first value.
- Set the subreport parameter to visible and ensure manually selecting/inputting multiple values returns appropriate results.
- If all else fails, try using a formula like this `=Split(join(Parameters!ParamName.Value,","),",")` which creates a comma separated list of the parameter values and then splits it out into an array.
Problem
I have a report in which the user can select multiple items in a list for one of the parameters. Clicking on the report opens a sub-report, with parameters being passed to the sub-report. If only one item is selected, then this works fine. If multiple items are selected, then only one item in the parameter list is passed to the sub-report. The parent report works fine, the sub-report only shows the first item. I am using SSRS 2008 R2. How can I get the sub-report to accept all the items for the passed parameter?