Print Page | Close Window

how to select colors on detail line

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=9353
Printed Date: 05 May 2024 at 9:07pm


Topic: how to select colors on detail line
Posted By: jrs1234
Subject: how to select colors on detail line
Date 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



Replies:
Posted By: DBlank
Date 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;


Posted By: DBlank
Date 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;


Posted By: jrs1234
Date Posted: 10 Mar 2010 at 2:26pm
thanks ... I was close and DUH on the red color logic .. it has been a LONG week!!!



Print Page | Close Window