bapi
bapi

Reputation: 1943

#Error is showing when database field is empty SSRS 2005

My SSRS expression was previously like this:

=Fields!Reference.Value // This Reference.Value in DB is varchar type.

Means, what ever the values are in DB table, i was able to display it. That is, for example value is 0 then i was able to display 0, if value is 1, i was able to display 1 and if value is empty, I was able to display empty.

Now, the situation is I was told, when the value is 0 then display empty. That means in case of 0 or Empty I have to disply Empty.So I added below expression:

=IIF(Fields!Reference.Value=0, " ",Fields!Reference.Value)

But, in this case, if the value is 0 I'm able to display empty. The problem is when there is empty DB field its showing #Error. How to correct it? Please help.

Upvotes: 0

Views: 432

Answers (1)

Chris Latta
Chris Latta

Reputation: 20560

=IIF(IsNothing(Fields!Reference.Value) OR Fields!Reference.Value = 0, " ",Fields!Reference.Value)

Upvotes: 0

Related Questions