Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: formula needed Post Reply Post New Topic
Author Message
Heedsie
Newbie
Newbie
Avatar

Joined: 18 Aug 2010
Online Status: Offline
Posts: 5
Quote Heedsie Replybullet Topic: formula needed
     Posted: 18 Aug 2010 at 12:14am
i am using a cross tab and have a field called history hours in summarized fields. this has been told to look at sum of history hours(which will total up all the hours) what i am trying to do is to format the field from my preview sheet and edit the formula in font to say:
 
if {HISTORY.Hours}in 0.00 to 5.99 then red else
if {HISTORY.Hours}in 6.00 to 9.99 then yellow else
if {HISTORY.Hours} >= 10.00 then green
 
this does not work as the history hours will not work as the cross tab is using sum of that field. i have taken it out but it still wont work.
 
any help in cracking this probably simple formula so the field will change colour if it is in the 3 options shown above.
 
many thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Aug 2010 at 3:30am
do you want to change the ink color in the cells for the crosstab?
right click on the cell
select format field
select font tab
click on the fomrula box for color
 
 
if currentfieldvalue in 0.00 to 5.99 then crred else
if currentfieldvalue in 6.00 to 9.99 then cryellow else
if currentfieldvalue >= 10.00 then crgreen else crblack
 
if you want to do the back group und color you can use the highlight expert
IP IP Logged
Heedsie
Newbie
Newbie
Avatar

Joined: 18 Aug 2010
Online Status: Offline
Posts: 5
Quote Heedsie Replybullet Posted: 18 Aug 2010 at 4:24am
thank you dblank, this worked straight away.
 
many thanks
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