Question

What could be wrong with my expression below? I am trying to check that if the first value in my parameter list is checked or selected, ssrs should give me this otherwise give me the list of values selected. ="Value: " & IIF(Parameters!Code.Label = "Select All","All",Join(Parameters!Code.Label,","))

Was it helpful?

Solution

When you choose "Select All" in a multi-value parameter, SSRS doesn't treat this as the actual parameter label, it will an array of labels from all the available values.

One way to get your requirement is to compare the number of selected parameters against the number of values in the parameter Dataset; if these match, all must have been selected:

="Value: "
  + IIf(CountRows("MyParameterDataset") = Parameters!Code.Count
    , "All"
    , Join(Parameters!Code.Label, ","))

If you are hard-coding the available values, i.e. not using a Dataset, you can hard code the count into the expression.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top