June 27, 2008 at 7:55 am
I need to display all the values of the Multi-value parameter being passed. With
=Parameters!ABC.Value(0) it just returns the first value in the parameter array.
How can I display all the values?
June 27, 2008 at 8:46 am
Use the following expression in your text box/cell/whatever:
=JOIN(Parameters!ParameterName.Value,'; ')
The last argument of this function '; ' is the one that will add the separator between each value, so you can change this according to your own requirements.
Good luck,
Nigel West
UK
June 27, 2008 at 8:56 am
It doesn' take .Value with JOIN.
the main problem is how would I know how many items in the Multi-value drop down user has selected?
June 27, 2008 at 9:02 am
Sorry, but it DOES take .Value with the JOIN function, the thing you have to remove is the (0) part that is automatically added when you select the parameter name using the wizard.
If you generate the expression using the wizard you will get:
=JOIN(Parameters!ParameterName.Value(0),'; ')
But what you want is:
=JOIN(Parameters!ParameterName.Value,'; ')
I use this on many reports I have that utilise multi-value parameters.
Nigel West
UK
June 27, 2008 at 9:09 am
I'm sorry! It didn't work for me. I get a syntax error if I write this statement.
June 27, 2008 at 9:11 am
where are you writing the statement? is this in a control inside the report or is it in a dataset somewhere?
Nigel West
UK
June 27, 2008 at 9:11 am
It did work without delimiter though-
=JOIN(Parameters!ParameterName.Value)
Have you have defined ';' somewhere?
thanks
June 27, 2008 at 9:15 am
No, it's not defined anywhere.....
HOWEVER...
It might be that your parameter is a number, and therefore the error is that you are trying to join numbers and strings.
If this is the case then maybe you could use:
=JOIN(CSTR(Parameters!ParameterName.Value),'; ')
This is just a guess mind, not tried it myself.
Nigel West
UK
June 27, 2008 at 9:16 am
singhs2,
Please copy and paste your exact syntax and the error message here. That may give us a clue why something that typically works every time is not working for you.
[font="Comic Sans MS"]toolman[/font]
[font="Arial Narrow"]Numbers 6:24-26[/font]
June 30, 2008 at 6:33 am
The error I get by doing so is-
The value expression for the textbox 'textbox#' contains an error: [BC30201] Expression expected.
June 30, 2008 at 6:36 am
Can you also paste the exact expression you are using.
Thanks,
Nigel West
UK
June 30, 2008 at 6:37 am
It did take double qoutes:
=JOIN(Parameters!ParameterName.Value,";")
Thanks for all your help!
June 30, 2008 at 6:42 am
Sorry about that, my (very silly) mistake.
Glad it's working now though.
Nigel West
UK
November 26, 2010 at 4:21 am
Tihs works fine,
But is it possible the other way around, to fill up the parametrer and then send it to the sub report?
In more words:
Lets say I have a parameter with values - Parameters!carType
carType contains ""Audi,"Porsche", "VW"
In the report I "deselect" Audi in an action button and want to update the parameter carType to only contain "Porsche", "VW" and send the updated parameter to same report and now show only those..
I dont find any way to populate the MultiValue variable...
Anyone??
--------
SSRS Visual Studio 2008
nigel.c.west (6/27/2008)
Use the following expression in your text box/cell/whatever:=JOIN(Parameters!ParameterName.Value,'; ')
The last argument of this function '; ' is the one that will add the separator between each value, so you can change this according to your own requirements.
Good luck,
December 7, 2010 at 5:05 am
Hi I don't know if you have resolved you rproblem but the syntax that you should enter is:
=JOIN(Parameters!ParameterValue.Value,", ")
Viewing 15 posts - 1 through 15 (of 17 total)
You must be logged in to reply to this topic. Login to reply