In recent past , i have seen multiple questions in forums around the IIF function is evaluating both True & False even the given condition is not satified.

Yes , By design the SSRS evaluates both True & False statments even though the condition is not satified and through error if something is not right.

For example , the below expression will fail if you pass a non date value in the parameter P1 with error

Conversion from string "test " to type 'Date' is not valid.

=iif(isdate(Parameters!P1.Value), CDATE(Parameters!P1.Value).ToString(), Parameters!P1.Value)

This error is beacuse SSRS is trying to execute the True part even the parameter passed is not a date. This can be worked around with the below expression


With the above Expression in the True part , the for the Cdate Function a valid data is passed when the parameter passed is not a date.

Here is another one sample expression to avoid Divide by Zero

=iif(Parameters!P1.Value = 0 , 1/iif(Parameters!P1.Value=0,1,Parameters!P1.Value),0)

For making the IIF to work in such scenarios , Make sure to  to write work around code as above to make the SSRS to evalute right even when the given condition is False.