soundarrajan
soundarrajan

Reputation: 159

SSRS value display #error for ssrs conditional expression

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

Answers (1)

kyzen
kyzen

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

Related Questions