SAP Knowledge Base Article - Public

1198535 - How to optimize the isNull() function for performance in Crystal Reports

Symptom

How can you optimize the use of the isNull() function when creating formulas in Crystal Reports?

Resolution

To optimize the speed and performance of the report when using the IsNull() function, please make sure to use the function at the beginning of your formula as follows:
 
For example:
      If IsNull({database.field}) or {database.field} = "somevalue" then
"Yes"
else "No"
 
Depending on your data, the following formula would potentially be evaluated significantly slower:
      If {database.field} = "somevalue" or IsNull({database.field}) then
"Yes"
Else "No"

This is because the NULL database fields will be evaluated after the "Else" statement instead of after the "Then" statement.

Keywords

order significance isNull , 3961550 , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

SAP Crystal Reports XI ; SAP Crystal Reports XI R2