I have the following expression in SSRS:-
=IIf(IsNothing(Fields!Hours.Value), 0, Sum(Fields!Hours.Value) / Sum(Fields!ReportingHours.Value))
The expression appears as #Error
. I removed the division part of the equation, leaving just this:
=IIf(IsNothing(Fields!Hours.Value), 0, Sum(Fields!Hours.Value))
Then the correct numbers appear. If I perform an addition operation, the calculation also errors out. It seems that it does not like something about performing mathematical operations when using the Sum()
function. If I do simple division without the Sum, as in this expression:
=IIf(IsNothing(Fields!Hours.Value), 0, Fields!Hours.Value / Fields!ReportingHours.Value)
Then numbers show up fine. It is only when I have the Sum()
function on the expression that causes an error. Any ideas as to how to fix this?