I have a dropdown parameter that comes from a separate SQL procedure. It returns 3 strings like this ABC, XYZ, JKL
. The parameter is mandatory, but the user can select 1 or 2 or all three of the values.
I need the report to display what the user selects.
For example if they select ABC and JKL I need the report to display "Shows Report: ABC, JKL.
I have the following code
="Shows Report. Hall: " & iif(isnothing(Parameters!hall.Value(0) = true),"", Parameters!hall.Value(0) & ", ") & iif(isnothing(Parameters!hall.Value(1) = true),"", Parameters!hall.Value(1) & ", ") & iif(isnothing(Parameters!hall.Value(2) = true),"", Parameters!hall.Value(2) ) & "."
However when the report runs I get an #error every time it runs. The report does work if my code looks like this
="Shows Report. Hall: " & Parameters!hall.Value(0) & Parameters!hall.Value(1) & Parameters!hall.Value(2)
But this only works if I select all three parameters, not 1 or 2 of them. This also doesn't give me any formatting. I could add "," in between but I only want them to display if there are more then one value.
Please advise on any suggestions to fix this issue
CodePudding user response:
Since it is a multi select parameter, why not just use this
="Shows Report. Hall: " join(Parameters!hall.Value,", ")