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

Conditional formatting problem 1

Status
Not open for further replies.

DelSenato

Programmer
May 1, 2003
14
0
0
GB
I have a requirement to change the detail color on a report to red based on a condition.

I tried using the Color X2 button on section expert but this was changing the entire line to red (including background) when what I want is the font color changed to red and the background to remain white. is there a method to change only the font color to red as I cant seem to find any.

I also tried to change the font color for the individual fields using X2 and this worked... but not for the subreport field which was contained in the detail.

So my question is this. How do I change the font color to red for all fields on a detail line without changing the background color also.

This has been driving me nuts and I think its a case of cant see the woods for the trees now.

Any help would be much appreciated.
 
You could add a formula on the main report that's similar to your font color formula, then pass that as one of the links to the subreport. Then, in the subreport, use the formula to set the font color of the subreport field(s).

-dave
 
I see what you mean--it looks like you can conditionally set the font color of the subreport object, but it doesn't seem to work. You have to conditionally set the font color of each field within the subreport, just as you would within the main report, using a formula like the following in the x+2 area for font color:

if {table.ID} > 2000 then crRed else crBlack

-LB
 
Dave,

an out of the box solution which helped prevent me going out of my box. Have a star.

Many thanks.

Mick.
 
Thanks, Mick. Glad I could help.

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top