UpwardD
UpwardD

Reputation: 767

Joining Parameters in SSRS

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,","))

Upvotes: 1

Views: 1530

Answers (1)

Ian Preston
Ian Preston

Reputation: 39566

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.

Upvotes: 3

Related Questions