Search code examples
reporting-servicesparametersssrs-2008ssrs-expression

How can I get the second value in multi-value parameter?


Is it possible to return the second, third and fourth values in a multi-value parameter? I can get the first one to populate just fine by using the parameter itself, but if I want to show the second one it doesn't work.

I've tried to use =Choose(2,CChar(Join(Parameters!EventIDs.Value,","))) or some variation of that, but to no avail. Is there some other way to do this? My parameter is ordered the way I want it so I just need to get the second value in the list.


Solution

  • According to this, you should be able to access the values and labels by index (in your case, index 1 would give you the second value, since arrays are 0-based):

    ' First
    Parameters!EventIDs.Value(0)
    Parameters!EventIDs.Label(0)
    
    ' Second
    Parameters!EventIDs.Value(1)
    Parameters!EventIDs.Label(1)
    
    ' And so on