0
votes

I have a field with below expression:

=join(iif(Parameters!FUP_Letter.Value = 1, "Yes", "No"), ", ")

When the report is loaded the field only says '#Error' instead of 'Yes, No', 'Yes' or 'No'

When I remove the IIF clause from this expression the result is just '1, 0' or '1' or '0'

As I am still new to SSRS I don't really know what I did wrong or how to find what I did wrong so if anyone could tell me the error or help me on my way I would be very grateful.

Kind regards

1

1 Answers

1
votes

I suspect the error is being caused by you trying to join one value to nothing. The IIF function isn't recursive, so it will return for the first value that you return so in the case above it will exit after evaluating 1 and returning yes. The join function then try's to join 'yes' to nothing and therefore errors.

you could do something like:

=Join(Replace(Replace(Parameters!FUP_Letter.Value,"1","Yes"),"0","No"), ",")

Actual used:

=Replace(Replace(join(Parameters!FUP_Letter.Value, ", "),"1","Yes"),"0","No")