Data Management Group Crystal Reports Training Boot Camp
Business Objects Authorized Education Partner
Home Corporate Information Training And Education Resources

Business Objects Top Authorized Education Partner for 2004 - View Our Courses

HOME
CORPORATE INFORMATION
TRAINING AND EDUCATION
RESOURCES>>>
RESOURCES > Trainer's Talk > IsNull Function

IsNull Function

Applies to
All versions
Conditional formulas
Formula evaluation
IsNull function


Synopsis
The Isnull function is used in a formula such as the following:

If {database.field} = somevalue or
Isnull({database.field}) then
"Yes"
Else
"No"

However, the fields that are null are completing the action after the "Else" statement rather than the "Then" statement.


Solution
The IsNull function is the second condtion in the formula.The IsNull function must always be used FIRST in a formula for it to be evaluated properly.

SQL Expression field versus a Crystal Reports formula field Often an SQL Expression field and a Crystal Reports formula field can accomplish the same goal. For example, a report design requirement is to display the first 3 letters of the first name of an employee. A formula field or an SQL Expression field can fulfill this requirement. The advantage of the SQL Expression field is that the processing of the request will be done on the database server instead of in the Crystal Reports Designer. This results in a faster processing time.


Example
If IsNull({database.field}) or
{database.field} = somevalue then
"Yes"
else
"No"

 

Sign Up for the BI Advantage Newsletter