Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Highlight Field Post Reply Post New Topic
Author Message
stefshuuj
Newbie
Newbie
Avatar

Joined: 24 Feb 2009
Online Status: Offline
Posts: 9
Quote stefshuuj Replybullet Topic: Highlight Field
    Posted: 28 Jan 2010 at 3:29pm
Hello all,

Hopefully someone has the answer to this one.

I am using Crystal Reports 2008.

I need to be able to highlight a field if the date a job was despatched is greater then the day it was meant to be.

So if "Despatch Date Field" is greater then "Due Date Field" highlight "Despatch Date Field"

Thanks in advance for any help

Cheers
Stephen
Thanks in Advance
Stephen
"CR Newbie"
IP IP Logged
davejwhite
Newbie
Newbie


Joined: 19 Jan 2010
Online Status: Offline
Posts: 34
Quote davejwhite Replybullet Posted: 29 Jan 2010 at 12:54am
Hi there,
 
Simple (when you know how!!).
 
1. Right click the field you want to highlight and select Format Field
2. Go to the Border tab
3. Click the x2  button to the right of the Background property. This opens the Formula Editor. You have to create the expression for which you want the property to be used
4. Build
 
If {Despatch Date Field}  >  {Due Date Field} Then
    crYellow
Else
    crNoColor
 
Notes:
1. You can use whatever colour you want instead of crYellow, but it has to be a Crystal reports constant. If you want non-regular colours, you can use the Color function, which takes three arguments all between 0 and 255. This determines the Red, Green, Blue factors in the colour
 
2. You must stipulate crNoColor in the Else part - otherwise everything goes black - that's the default colour in an expression like this.
 
Good luck!
IP IP Logged
davejwhite
Newbie
Newbie


Joined: 19 Jan 2010
Online Status: Offline
Posts: 34
Quote davejwhite Replybullet Posted: 29 Jan 2010 at 12:56am
PS. If you want a colour highlight behind the whole Detail line, do the above on the Background Colour of the Detail section in the Section Expert
IP IP Logged
stefshuuj
Newbie
Newbie
Avatar

Joined: 24 Feb 2009
Online Status: Offline
Posts: 9
Quote stefshuuj Replybullet Posted: 01 Feb 2010 at 3:45pm
Thanks Alot for that.
 
Was odd. Even though I put crYellow, I didnt highlight yelllow. Instead it highlighted silver because the dropdown box was still silver.
 
Changed the dropdown to yellow and it worked.
 
Cheers
Thanks in Advance
Stephen
"CR Newbie"
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.