I’m generating a notice that the user will need to select reasons for an application was rejected. The user could select multiple reasons, but must include at least one. So I needed to display the reasons of rejection in the report like:
The problem I was running into was checking how many reasons were selected and displaying only the selected amount. I was at first trying something like this for all counts of Parameters!Reasons:
=IIF(Parameters!Reasons.Count < 2, “”, “* “+Parameters!Reasons.Value(1))
The problem with this is, even though the count was less than 2 the false part of the IIF still gets evaluated, giving me an “#Error” in my document with an index out of bounds.
I then got cleaver and tried using the join and came up with this:
="* " + Join(Parameters!Reasons.Value,VbCrLf+VbCrLf + "* ")
While, normally a join would use something like a whitespace or comma to delimit.