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

Crosstab column header background based on field value

Status
Not open for further replies.

HuseyinEce

Programmer
Jul 14, 2011
21
0
0
CA
Hi,

I have crosstab report and I’d like to change column header based on one of my field’s value. My field has two values N and Y. I put “if {S_CCO_JOB_STATUS;1.bd} = "Y" then crGreen else crNoColor “ It take only first row value and fills all the columns background with that color. (like if first record value is N then puts crNoColor. If firs record value is Y then puts crGreen.)

How can I fix this problem?

Any help is greatly appreciated,

Thanks
 
Its not clear from you post what you want it to do, but if you want header to go Green if any rows return "Y" then you could try using a summary

Not tried this but if formatting will allow you to use summaries, try

if maximum({S_CCO_JOB_STATUS;1.bd}) = "Y" then crGreen else crNoColor

Ian
 
Hi Ian,

Please look at the attached sample report. The report shows each job's status in a month(1,2,3,4.. is days of the month.)
I am trying to change days'(1,2,3,4...) background color based on my bdfield value. This field keeps value that shows that day business day or not. If it is weekend then my value is “N” other wise is “Y”.
I am trying to do this under format field editor --> Border-->Background-->X2.

here is the attached file link:



Please advise..

Thanks
 
Hello,

If the field that holds the day of month is date type this should work:
On Format > Border > Background > x+2:
if dayofweek(currentfieldvalue) in [1, 7] then
crgreen
else
crblack

Dana
 
Please do not crosspost. I answered in the other forum.

-LB
 
Did you try my suggestion in the other forum? I tested it and it worked, so if you had trouble with it, please respond to that post.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top