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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab Values Formatting 1

Status
Not open for further replies.

dukeslater

Technical User
Jan 16, 2001
87
US
I have a crosstab that basically does what it's supposed to:

ID Name Hiredate Traindate Week 1(1/1/05) Week 2(1/8/05)
1 Joe 1/1/1980 1/7/2005 99.99 100.00

The summarized field is the value for week 1, week 2, etc. What I would like to do is to change the font color of the summarized value for all weeks greater than the training date. In the example, the week 1 value would be black and all weeks starting with week 2 value would be blue. It seems like a simple formula would do it, but I can get all fields blue or none of them blue. Perhaps it's an evaluation time issue.

It's not critical for this project, but it would be a little icing on the cake.

Thanks in advance...
 
How did you enter ID, Name, HireDate, and TrainDate into the crosstab? Did you concatenate these fields to create 1 rowfield?

-LB
 
Nope - the summarization is done within a stored procedure, so the crosstab just has one record per row. Any summary function would work within the crosstab, of course - I used max. I don't have the problem on this one that the concatenation technique solves.

I'm using a crosstab because the number of weekly columns will continue to increase to an unknown, large quantity.

Thanks - I always enjoy reading your solutions.

 
Is this an inserted crosstab? I am asking what your row fields are specifically--not the summary.

-LB
 
Yes on the inserted crosstab - row fields are ID, name, hiredate, and training date.

Thanks,

JW
 
Try the following. Select a cell, and then go to format field->font->color->x+2 and enter:

if GridRowColumnValue ("Table.ColumnDate") >=
GridRowColumnValue ("Table.TrainDate") then crBlue else crBlack

You have to substitute your column date field for "Table.ColumnDate" enclosed in quotes, but without the curly brackets. Same for the TrainDate field.

-LB

 
Perfect - major brownie points for me. Thanks again.

JW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top