Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: how to select colors on detail line Post Reply Post New Topic
Author Message
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Topic: how to select colors on detail line
    Posted: 10 Mar 2010 at 1:52pm
Hello,
 
I have a 'DaysBehind' Field ..
 
If DaysBehind >= 4
then
yellow
else
if DaysBehind >=8
then
red
else
default color;
 
I tried going to the detail line > color tab > and adding in a formula :
 

If ({DaysBehind}>=4) Then Color CrYellow

Else
If ({DaysBehind}>=8) Then Color CrRed Else  
 
DefaultAttribute;
 
 
but it is throwing up an error 'the remaining text doesn't appear to be part of the formula (after the first 'Then')..
 
any ideas ?
 
thanks
Jenn
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Mar 2010 at 2:22pm
Drop 'COLOR' out.
You can use that for a custom RGB value as in color (100,12,8)
 

If ({DaysBehind}>=4) Then CrYellow Else

If ({DaysBehind}>=8) Then CrRed Else  
 
DefaultAttribute;
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Mar 2010 at 2:25pm
That being said your logic here would preclude RED from ever being used.
You would have to change the order or the syntax...
If ({DaysBehind}>=8) Then CrRed Else 

If ({DaysBehind}>=4) Then CrYellow Else

DefaultAttribute;
IP IP Logged
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Posted: 10 Mar 2010 at 2:26pm
thanks ... I was close and DUH on the red color logic .. it has been a LONG week!!!
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.