Reputation: 159
This is the expression used for calculating the value:
=iif((Sum(CDbl(Fields!RxCount.Value))=0),"0.00",(Sum(Fields!Margin.Value)/Sum(CDec(Fields!RxCount.Value))))
ie:
if Sum(CDbl(Fields!RxCount.Value = 0, result shoul be 0.00 otherwise it should be the divide of two values.
but it display #error
when Sum(CDbl(Fields!RxCount.Value = 0
not 0.00
Any help.
Upvotes: 0
Views: 2072
Reputation: 1609
You need to test for null values as well, the #Error is likely occurring because
Sum(CDbl(Fields!RxCount.Value))
is returning a null value, not a 0.
Upvotes: 1