Condition if value is null ?

Stimulsoft Reports.NET discussion
Post Reply
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Condition if value is null ?

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Condition if value is null ?

Post 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.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Condition if value is null ?

Post by Jennypi »

Perfect, thank you!
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Condition if value is null ?

Post by Andrew »

Hello,

Have a great weekend!

Thank you.
Post Reply