Page 1 of 1

Condition if value is null ?

Posted: Thu Dec 01, 2011 11:22 am
by Jennypi
Hi all,

In a report, some fields contain no value, so they are (null) in the DB.
If I put no condition, the report shows "0" instead of null.
I don't want to display the 0, so I defined a condition with expression:

Code: Select all

DataSource1.field1==null
but it has no effect.

What should I put in the condition box?

Thanks

Condition if value is null ?

Posted: Fri Dec 02, 2011 8:41 am
by HighAley
Jennypi wrote:In a report, some fields contain no value, so they are (null) in the DB.
If I put no condition, the report shows "0" instead of null.
I don't want to display the 0, so I defined a condition with expression:

Code: Select all

DataSource1.field1==null
but it has no effect.

What should I put in the condition box?
Please, try to use next expression:

Code: Select all

DataSource1.field1==DBNull.Value
Thank you.

Condition if value is null ?

Posted: Fri Dec 02, 2011 1:24 pm
by Jennypi
Perfect, thank you!

Condition if value is null ?

Posted: Sat Dec 03, 2011 3:00 am
by Andrew
Hello,

Have a great weekend!

Thank you.