Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Null Field Conditional Formatting Post Reply Post New Topic
Author Message
chris
Newbie
Newbie


Joined: 02 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote chris Replybullet Topic: Null Field Conditional Formatting
     Posted: 16 Sep 2009 at 7:36am
Hi all,
 
I have a report where I would like to add a background colour to certain fields that contain a null value.
 
I have used the formatting formula for background colour:
 
if isnull(field_name)
then crRed
else DefaultAttribute
 
For some reason, this does not highlight the nulls.
 
I have added a simple isnull formula on the field and it returns a TRUE.
 
I amended the formula to pick a field value instead of null and that works fine.
 
Any ideas ??
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Sep 2009 at 7:42am
When NULL the field does not exist so there is nothing to adjust. You have to repalce the NULL with an empty string (or data appropriate options).
FOrmula field as
if isnull(field) then "" else field.
now you can format the formula field and it should apply the background.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum