How to determine if a field is null
I am trying to determine if a field is null or not, but I do not how to do it. I have tried:
[IIf(ds.EntryDate==null, "<no date>", ds.EntryDate)]
and also
[IIf(ds.EntryDate==BNull.Value, "<no date>", ds.EntryDate)]
but both do not work. How can I do it?
Thank you
[IIf(ds.EntryDate==null, "<no date>", ds.EntryDate)]
and also
[IIf(ds.EntryDate==BNull.Value, "<no date>", ds.EntryDate)]
but both do not work. How can I do it?
Thank you
Comments
IIf([ds.EntryDate] == null || [ds.EntryDate] is DBNull, "<no date>", [ds.EntryDate])
I am using:
[IIf([ds.EntryDate] is DBNull || [ds.EntryDate] == null, "<NULL>", [ds.EntryDate])]
and I FR prints out 01/01/1001 0:00:00
I would expect to see <NULL> because the field is null, checked in View Data panel and in other tools.
I am using Firebird as database, maybe it could be relevant.
Thank you
[IIf(Report.GetColumnValueNullable("ds.EntryDate") is DBNull, "<NULL>", [ds.EntryDate])]
You may also use the "NullValue" property of the Text object:
Text = [ds.EntryDate]
NullValue = <NULL>