May 28, 2008 at 6:00 am
I am rather new to SSRS and feel dumb asking this question, but here it goes.
I have a report that lets users select 1 to Many months of information. i.e. User can select June 2007, or select June 2007, July 2007, & August 2007....etc. In the title, I can display 1 selected month easily....
="Record Errors for " + Parameters!pMoYrSelect.Value(0)
. If I knew the exact number of months that would always be selected, I could just do something like
="Record Errors for " + Parameters!pMoYrSelect.Value(0) +", "+Parameters!pMoYrSelect.Value(1)
+", "+Parameters!pMoYrSelect.Value(2)+", "+Parameters!pMoYrSelect.Value(3)
However, that does not work if the user is going to always select a different amount of months to view. How do I get any amount of selected months to display in the title? I had found a forum user posted to try
To show multivalue parameters can try something like this:
= Join(Parameters!Customer_Group.Value,", ") & " customers. Records Found: (" & CountRows().ToString & ")"
, but this didn't work when I tried it.
Any help would be great. Thanks!!
May 28, 2008 at 8:59 am
Gekko (5/28/2008)
I am rather new to SSRS and feel dumb asking this question, but here it goes.I have a report that lets users select 1 to Many months of information. i.e. User can select June 2007, or select June 2007, July 2007, & August 2007....etc. In the title, I can display 1 selected month easily....
="Record Errors for " + Parameters!pMoYrSelect.Value(0)
. If I knew the exact number of months that would always be selected, I could just do something like
="Record Errors for " + Parameters!pMoYrSelect.Value(0) +", "+Parameters!pMoYrSelect.Value(1)
+", "+Parameters!pMoYrSelect.Value(2)+", "+Parameters!pMoYrSelect.Value(3)
However, that does not work if the user is going to always select a different amount of months to view. How do I get any amount of selected months to display in the title? I had found a forum user posted to try
To show multivalue parameters can try something like this:
= Join(Parameters!Customer_Group.Value,", ") & " customers. Records Found: (" & CountRows().ToString & ")"
, but this didn't work when I tried it.
Any help would be great. Thanks!!
From the title of the post, I assume that you're talking about the selection of the dates being in a Multi-Value parameter.
If so, change your code to:
"Record Errors for " & Join(Parameters!pMoYrSelect.Value, ", ")
or
"Record Errors for " & Join(Parameters!pMoYrSelect.Label, ", ")
the omission of the (x) is deliberate, and uses the whole thing. .Value shows the underlying values, .Label shows what was displayed to the user.
HTH,
Wayne
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 28, 2008 at 9:01 am
Thank you so much for your help! Worked perfectly.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply