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

Cross-Tab Colour Grading

Status
Not open for further replies.

CIBS

Technical User
Nov 15, 2007
73
GB
Hi

CR Version - 9

if CurrentFieldValue = 0 then crWhite else
if gridrowcolumnvalue ("@type")= "downtime" and currentfieldvalue >0 then crred AND
if gridrowcolumnvalue ("@type")= "TRAVEL" and currentfieldvalue > gridrowcolumnvalue ("@type")= "WORK" then crred

I have the above formula in conjunction with a cross-tab table. as you can see there is a problem with the last part, I can't figure out how to get this to work. What the above is doing :

1: if and data value = 0 then text white (to create blank cell)
2: in the column titled downtime make all red
3: (This is what I need Help with) if the data in column Travel is greater then Column work then text red

Can you please help with no. 3 as I can't figure it out

Kind Regards

Stephen
 
Please explain how the crosstab is set up--columns, rows, and summary fields.

-LB
 
Rows = employee
columns = activity type
sumarised = Sum of time

hope this helps
 
How many different activity types are there?

-LB
 
Sorry about the delay.

but the activity types are

downtime
training
holiday
lunch
travel
work

Kind Regards

Stephen
 
I think you would have an easier time if you create a manual crosstab where you create one formula per column instance, as in:

//{@downtime}:
if {table.columnfield} = "downtime" then {table.time}

Repeat for each column instance. Insert a group on your row field and then place the above formulas in the detail section and insert summaries on them at the group level. You can then:

1) suppress if zero
2) color the downtime column red
3) create a coloring formula that compares travel with work:

if sum({@travel},{table.groupfield}) > sum({@work},{table.groupfield}) then crRed else
defaultattribute

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top