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 wOOdy-Soft 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.

pandy1

Programmer
Oct 9, 2002
52
US
Hi ,

I have a field which displays a number. Depending on a specific condition it should display a color(Font color or Background color). Any ideas please...

thanks
 
Crystal does this readily:

Right click the field and select Font...

Click the X-2 area next to the Color, place the formula you want, such as:

If {MyTable.MyDate} < currentdate-7 then
CrRed
else
CrBlue

-k kai@informeddatadecisions.com
 
To change the colour of your background conditionally, right click the field, hit the Border tab, check the Background x+2 button, and enter your conditional formula.

Like:

If {Field} = 'X' Then Blue Else Red;

If what you really want is to change the font and not the background, you'd use html in your formula.

Naith
 
Hi,
I want to set the background color instead of font color.

I have 3 city names like

city1
city2
city3

depending on condition, like nearest city, one city field should have a different background color, all others should be the default. When i write a formula and do this, the nearest city is getting the color what i set, but the remaining cities becoming black i.e., background. can you help

thanks



 
Change the formula you're using to finish up with

else NoColor

So, in the case of my example, it'd become:

If {Field} = 'X' Then Blue Else NoColor;

Naith

 
Its working fine...thanks a lot Naith...thank you very much..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top