Assign Null value of DataTable Column to int variable?

Stimulsoft Reports.NET discussion
Post Reply
amitkaushik
Posts: 74
Joined: Fri Dec 07, 2012 11:35 am

Assign Null value of DataTable Column to int variable?

Post by amitkaushik »

I have null value in integer column in DB. and looking to assign that null value to integer variable in stimulsoft. but it became 0 here.

it can be possible to assign null value to variable?
and can i put the condition like

{iff(data2.id == null,"0",data2.id)}

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Assign Null value of DataTable Column to int variable?

Post by Alex K. »

Hello,

Please try to use the following expression:
{iff(data2["id"] == DBNull.Value,"0",data2.id)}

Thank you.
amitkaushik
Posts: 74
Joined: Fri Dec 07, 2012 11:35 am

Re: Assign Null value of DataTable Column to int variable?

Post by amitkaushik »

Thank you
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Assign Null value of DataTable Column to int variable?

Post by Alex K. »

Hello,

We are always glad to help you!
Let us know if you need any additional help.
Post Reply