Hi, when a data (of type DateTime) is null, what is its Stimulsoft Report Tool equivalent? I understand that for number values -- it sets to 0 given that property ConvertNull = True.
I needed your advise on this since I got an error for this situation: I am trying to create a BeforePrint condition so that FooterDates.Enabled = false whenever OrderInstrum.CommencementDate is null.
I used this:
if (dspaymentCertificateForm.COMMENCEMENTDATE.Equals(null))
FooterDates.Enabled = false;
But I got this error:
Method: [get_COMMENCEMENTDATE] Object reference not set to an instance of an object.
Please advise what can I do about this.
Thanks in advance.
Equivalent value for a NULL DateTime Data type (on ConvertNull Property = true)
Equivalent value for a NULL DateTime Data type (on ConvertNull Property = true)
Please modify your code in the following way:
Also about this kind of checking you can read more here:
http://www.stimulsoft.com/Documentation ... riable.htm
Thank you.
Code: Select all
if (dspaymentCertificateForm["COMMENCEMENTDATE"] is System.DBNull)
FooterDates.Enabled = false;
http://www.stimulsoft.com/Documentation ... riable.htm
Thank you.
Equivalent value for a NULL DateTime Data type (on ConvertNull Property = true)
Thanks Edward. I just came back to check the reply today. Anyway, I was able to use this after browsing on some related forum topics:
if( dspaymentCertificateForm["COMMENCEMENTDATE"] == DBNull.Value & dspaymentCertificateForm["COMPLETIONDATE"] == DBNull.Value )
FooterDates.Enabled = false;
Now I would love to try the code you suggested. (Taking it from the expert) :biggrin:
Cheers*
Karen
if( dspaymentCertificateForm["COMMENCEMENTDATE"] == DBNull.Value & dspaymentCertificateForm["COMPLETIONDATE"] == DBNull.Value )
FooterDates.Enabled = false;
Now I would love to try the code you suggested. (Taking it from the expert) :biggrin:
Cheers*
Karen