In the formula where the code is defined, try changing the setting "Exceptions for Nulls" to "Default values for Nulls".
If you choose Exceptions For Nulls, the program treats a null value as an exception and halts formula evaluation when it encounters such a value.
If you choose Default Values For Nulls, the value that the program assigns varies depending on the data type that you are using in your formula. (These default values are the same values that are used for uninitialized variables.)
Another solution is to create an "SQL variable", they are created in a similar way to formulas. You would need something like this:
IsNull("str24"."strmname", 'Stream not named in the database')
This code is put into the SQL query and is handled by the server, not Crystal. The IsNull function works different in SQL server from Crystal. In SQL server, if the field is Null it returns the value in the second parameter. Field and table names may be delimited in double quotes so strings must be delimited with single quotes. This method is more efficient since the SQL server does the work, not Crystal.
Edited by rvink - 04 Feb 2008 at 6:30pm