KBA-01083: How to test for Null Fields in Report Server reports


In my custom report, how do I enter an expression that deals with a field that can be NULL?


Many fields in sfPMS are stored as NULL values in SQL when they are not applicable.  For example, xsfDocItem.ResponsibleParty will be NULL if there is no responsible party specified for this particular item. To test for NULL in a SQL Reporting Services report (RDL), use the following syntax:

=IIF(Field!ResponsibleParty.value IS nothing,‘ no one ‘, ‘ someone ‘)

Additional Comments:

If you directly reference a null field in an expression, Report Server will generate repeated warnings that the ‘value is not an object’.

KBA-01083; Last updated: October 27, 2016 at 12:38 pm
Keywords:  DBNULL, null value, empty fields