Wednesday, March 28, 2012

Passing Multi-Valued Parameter to Subreport

I have a multi-valued parameter that I want to pass to a subreport. The values are 11, 12, 13, and 14.

So here's what I've done:

1. For the properties of the clickable field of the first report, I have gone to the Navigation tab and chosen the subreport in the "jump to report" pulldown.

2. Then I clicked on the Parameters button and added a parameter name for the multi-valued parameter I am trying to send. For the Parameter value, I have tried 11,12,13,14. I have also tried =Split(11,12,13,14)

3. On the subreport, I create a report parameter with the same name, data type is string, multi-value is checked, and the available values pulldown is populated by a query.

So I run the first report and click on the link that brings me to the subreport, but all the subreport shows is the results for 11, not 12, 13, and 14.

How can I get the second report to understand that I want it to show all the records related to 11, 12, 13, and 14? If I bypass the first report and simply use the drop-down to choose 11, 12, 13, and 14 in the subreport, it works fine. I just can't seem to figure out how to correctly have the first report tell the subreport that it wants 11, 12, 13, and 14.

Thanks in advance for any advice!

Dan

Hello Dan,

You should check out this post in which Robert explained a solution.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=164056&SiteID=1

Jarret

|||

Jarret,

Thank you so much! That post revealed my mistake. I was forgetting to specify the delimiter in the Split statement.

When I pass the following: =Split("11,12,13,14", ",") out of the first report
it works just fine.

Have a great day!
Dan

No comments:

Post a Comment