Reporting Services Divide by Zero problem.
Hi all,
I hope someone can shed some light on how to correct this problem. I'm calculating a cents per kilometre value on a report in Reporting Services, and I'm using the following expression:
=IIF(Fields!ODO.Value <> 0, (Fields!MAINT.Value + Fields!SERVICE.Value + Fields!TYRES.Value) / Fields!ODO.Value, 0)
Now, for some reason, it's ALWAYS doing the divide. Even when the ODO field is zero. I've tried various brackets to try force RS to check the value of the IF statement before doing the divide but it doesn't work.
I want to prevent the report showing "#Error", and put ".00: in there instead.
PLEASE HELP! Thanks!