Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional change cell color in crosstab

Status
Not open for further replies.

TaylorTot

Technical User
Dec 23, 2003
96
US
Hello,

I'm using Crystal 8.5 and have built a crosstab that looks like a calendar for a series of dates. I would like to change the background color of each cell in a crosstab to reflect the deadline date.

The crosstab is in the footer and looks like this:
Jan Feb Mar
OVG 1 05 1/1 3/1
OVG 2 05 2/1
MPG 1 05 1/1 3/2

1/1 = close date so cell should be red
3/1 = ad date so cell should be blue
Thanks!
 
Hi,
What is the basis for determining
close or ad date?

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
right click on the field on design mode

format field>border

thick the background color option and choose X-2 button

if {table.field} = 1/1 then
crRed
else if {table.field} = 3/1 then
crBlue
else
nocolor

Mo
 
In a crosstab, you would need to use a formula like:

if currentfieldvalue = date(2005,01,01) then crRed else
if currentfieldvalue = date(2005,03,01) then crBlue else crNocolor

This assumes that your summary field is a date datetype, and that the year is 2005.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top