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

Adding Font Color w/ Formulas

Status
Not open for further replies.

TheMagikWand

Technical User
Aug 11, 2003
35
US
hey guys/gals

i have a report that needs to be a little more visually appealing so ive decided to add some colors here and there, but i ran into one problem that i cant solve.

i have an "if-then-else" formula that takes account balances and sorts them into 3 categories, paid, overpaid, underpaid. id like to have the fomula make each different group a different font color, but i cant seem to get it to work.
here's my formula:

if {@Balance}>0 then ("underpaid" red)

else if {@Balance}<0 then (&quot;overpaid&quot; blue)

else (&quot;paid&quot; green)

Any Ideas????

Thanx in advance,
B U D
 
Your trying to do two things at once. You need to add to the format font section under color formula something like:

if @yourifthenelseformula = &quot;underpaid&quot; then crRed
else if @yourifthenelseformula = &quot;overpaid&quot; then crBlue
else if @yourifthenelseformula = &quot;paid&quot; then crGreem
else crBlack

I usually add something for &quot;it didn't work&quot; .. in this case crBlack .. just in case the formula doesn't work correctly for some case.

Lisa
 
hi lisa,

thanks for the tip but i just tried doing that and for some odd reason instead of changing the font color, it added a random numerical value, in my case 16711800.00, heres my 2nd formula did i do anything wrong??

if {@Status}= &quot;Overpaid&quot; then crblue

else if {@Status}= &quot;Underpaid&quot; then crred

else crgreen

//Status is the title of my formula field

thanx,
B U D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top