IsNothing not working on empty value in report builder

user2094981 picture user2094981 · Jul 7, 2013 · Viewed 39.3k times · Source

I have an expression in a table that checks if there was a return value.

If the query returns empty or null I want to set the value to 0.

=IIF(IsNothing(Fields!DndCount.Value),0,Fields!DndCount.Value)

But if the query returns empty IsNothing() does not work.

Answer

Wanja picture Wanja · Sep 4, 2014

I have tried this code and it worked for me.

IIF(Sum(Fields!DndCount.Value)Is Nothing, "0", Sum(Fields!DndCount.Value))