=iif(Sum(Fields!ClsRead.Value)-Sum(Fields!OpnRead.Value)=0,"NO HSD Supplied",sum(Fields!HSDIssued.Value)/(Sum(Fields!ClsRead.Value)-Sum(Fields!OpnRead.Value)))
Using IIf
you have to remember that both side (TruePart
and FalsePart
) are always evaluated so dividing by 0 raise an #Error
.
You can use custom code (right click design surface outside report > Report Properties > Code
) and replace IIf
with an If/Then/Else
.