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!

Font color

Status
Not open for further replies.

alvintse

Programmer
Aug 1, 2003
66
US
How can I change the font color based on the result of the formula in CR9?

I have created a formula and placed it at the group footer.

The datatype of the formula is number. I want the font color in Red if the result is less than zero.

I have tried formated the field color by setting the condition:
{@formula1} < 0

I got an error message &quot;For formula result must be a number&quot;

Thanks for any suggestion.

 
I hope this helps you.
In format editor/Font/Color type in the formula below:

IF {@formula} < 0 then crRed else crBlack.

You can find more information under the formula Function Tree under Color Constants.

 
Alvintse,
I am using CR 8.5 and have a similar condition. You can try the following:
In Design View right click on the field whose color you want to change.
Click on format field.
Click on the &quot;font&quot; tab.
Click on &quot;x+2&quot; next to &quot;color&quot;
Then use the following formula:

if {table.fieldname} < 0
then red else black

Hope this helps.


Kchaudhry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top