I am trying to create a custom IsNull function in Crystal Reports; the function should act in the same way as the IsNull function in MS SQL Server. I want to specify a field, and if the field is null, then it should be returned with the value I specified.
IsNull({myField},0) or IsNull({myField},'Hello World')
I came across the fact that I need to create a separate function for numeric fields and a separate function for text fields. I also found that Crystal does not allow the use of standard functions inside a custom function, for example, ISNULL Function:
Function(NumberVar param, Numbervar setter) IF ISNULL(param) THEN setter ELSE param
and
Function(StringVar param, StringVar setter) IF param = NULL THEN setter ELSE param
Does anyone know how I can create such a function in Crystal and work around ISNULL inside a user-defined function?
source share