I'm having a problem when trying to display a 0 when there is an occurrence of a special which I have listed in my data source
The normal sum computes fine and displays in the cells without the special day, but the cells which have a special day displays an #error
=iif(Fields!SpecialDay, 0, Fields!NormalSum)and then I have tried variations to get the integer, such as
CInt("0") Fields!NormalSum - Fields!NormalSum
but I still get an #Error in the cells for which I wish to display a 0.
Any thoughts on this particular problem?
asked Jan 11, 2011 at 01:34 AM in Default
IIRC Iif is an if-then-else sort of operation, so you need to return a true/false for Fields!SpecialDay. Have you tried doing a comparison against a certain value?
This equates to: "If Fields!SpecialDay equals 1 then return 0 otherwise return Fields!NormalSum"
It may be that SSRS is not seeing SpecialDay as a true/false value in the statement you supplied (i don't know if it is clever enough to do that like "real" programming languages can - i may be wrong though).
answered Jan 11, 2011 at 01:44 AM