Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Font Color of a field in Crosstab Post Reply Post New Topic
Page  of 2 Next >>
Author Message
nathalie
Newbie
Newbie


Joined: 18 Feb 2010
Location: Lebanon
Online Status: Offline
Posts: 1
Quote nathalie Replybullet Topic: Font Color of a field in Crosstab
     Posted: 20 May 2010 at 11:31pm

Hi All,

how can i change the font color of a value in crosstab, i want to have the color below:
for grade <50 then Red else Green
 
i have put the formula below on the color option but it shows all as green,
if grade < 50
then crred
else crgreen
 
Thanks in advance
Nathalie
IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 22 May 2010 at 8:52pm

Try this:

- right click the field (Grade)
- select 'Highlighting Expert...'
- click 'New'
- Value of = 'this field'
- 'is greater than'
- '50'
 
change the:
- font style
- font color
- etc...
 
 
hope it help
Emir W
IP IP Logged
mmusiol
Newbie
Newbie
Avatar

Joined: 09 Jul 2010
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote mmusiol Replybullet Posted: 09 Jul 2010 at 7:22am

Emir W,

This is very useful, but can this be done if the colour is not dependant on this field?  I have a cross-tab that shows achievements and targets per month.  I am looking to colour code it to be red if the target is not met and green if it is met.  Your solution above in the "Value of = " field only allows me to use "this field", "column name" or "row name".  Is there any way around this?

Thanks in advance.

IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 09 Jul 2010 at 9:34pm
i think, you can create a formula to identify which one met the target or not.
and you can use it in your crosstab and make a condition (highlight expert) for this formula.
 
 
hope it help.
 
Emir W
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Jul 2010 at 4:08am
right click on the cell you want to change
select format field
select Font tab
select the COlor formula
use
if currentfieldvalue<50 then crred else crgreen


Edited by DBlank - 12 Jul 2010 at 4:09am
IP IP Logged
mmusiol
Newbie
Newbie
Avatar

Joined: 09 Jul 2010
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote mmusiol Replybullet Posted: 12 Jul 2010 at 5:17am
Emir W,
If I add a formula to the crosstab - which is percentage of target achieved, I can use the highlighting expert to highlight this crosstab field only but not the number achieved (which is want I am after).  Also, I now have a extra line in the cross tab which is percentage of target achieved...
 
 
DBlank,

I have tried this, but it just turns all of the fields red even when some should be green...

Thank you for your help, but I don't seem to have found a solution yet...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Jul 2010 at 5:40am
I assumed you wanted to alter the same field that the <50 or >50 was in.
Are you trying to alter a field based on a different fields result?
IP IP Logged
mmusiol
Newbie
Newbie
Avatar

Joined: 09 Jul 2010
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote mmusiol Replybullet Posted: 12 Jul 2010 at 5:48am
Yeah, pretty much.  I now have 3 fields in the cross-tab.  Actual (achieved), target and percentage of target achieved.  Although I can get the colours to work in the percentage of target achieved, I want these colours to reflect in the Actual field and I don't want the percentage achieved showing in the crosstab.
Your help is greatly appreciated!!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Jul 2010 at 5:59am
How are you getting the 3 values? Running Totals?
IP IP Logged
mmusiol
Newbie
Newbie
Avatar

Joined: 09 Jul 2010
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote mmusiol Replybullet Posted: 12 Jul 2010 at 6:04am
No, the actual and target are monthly numerical values.  The percentage is calculated from these numbers.  They sit in the "details" section.  When in the details section, I can colour code them, but once I transfer them into the crosstab, I can't do it!  The report is grouped by month and then year - the crosstab sits in the year group footer...  
IP IP Logged
Page  of 2 Next >>
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