Attaching 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 that otherwise, give me a list of selected values. = "Value:" and IIF (Parameters: Code.Label = "Select All", "All", Join (Parameters! Code.Label, ","))


source to share

1 answer

When you select Select All on a multi-valued parameter, SSRS does not treat it as an actual parameter label, it will be an array of labels from all available values.

One way to get your requirement is to compare the number of selected parameters with the number of values ​​in the Dataset parameter; if they match, all should be selected:

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


If you are hard-coding the available values, that is, you are not using a dataset, you can write code to an expression.



All Articles