Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Conditional formatting Post Reply Post New Topic
Author Message
Vack
Newbie
Newbie


Joined: 22 Oct 2008
Location: United States
Online Status: Offline
Posts: 24
Quote Vack Replybullet Topic: Conditional formatting
     Posted: 14 Apr 2009 at 12:01pm
I want to add a background color to a field. I choose a color and hit the formula button. If the month of the current date is 4 I want that field to have a background color so I used the following:
 
month(currentdate)=4
 
When I try to save this I get the message:
 
The Formula Result Must Be a Number
 
 
Is there another way I need to do this??
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Apr 2009 at 12:08pm
if month(currentdate)=4 then crRed else crNocolor
 
Replace the colors in this with the 2 conditional colors you want
IP IP Logged
Vack
Newbie
Newbie


Joined: 22 Oct 2008
Location: United States
Online Status: Offline
Posts: 24
Quote Vack Replybullet Posted: 14 Apr 2009 at 12:15pm
Thanks, that did the trick.
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