Multi-Value parameter

  • 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?

  • 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

  • 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?

  • 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

  • I'm sorry! It didn't work for me. I get a syntax error if I write this statement.

  • where are you writing the statement? is this in a control inside the report or is it in a dataset somewhere?

    Nigel West
    UK

  • It did work without delimiter though-

    =JOIN(Parameters!ParameterName.Value)

    Have you have defined ';' somewhere?

    thanks

  • 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

  • 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]

  • The error I get by doing so is-

    The value expression for the textbox 'textbox#' contains an error: [BC30201] Expression expected.

  • Can you also paste the exact expression you are using.

    Thanks,

    Nigel West
    UK

  • It did take double qoutes:

    =JOIN(Parameters!ParameterName.Value,";")

    Thanks for all your help!

  • Sorry about that, my (very silly) mistake.

    Glad it's working now though.

    Nigel West
    UK

  • 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,

  • 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