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!

Need help with font color

Status
Not open for further replies.

azims

IS-IT--Management
Feb 28, 2003
1
US
Hi,
I am new to crystal report. I am able to generate an html out of the crystal report. I need to give color to some fields according to certain values. I know we should use formula. but when i used formula like
If condition then
&quot;<font!*!color=red>&quot;+valuefromdb+&quot;</font>&quot;
else
valuefromdb
the html is showing the color but when i put it as a column in a table so that the viewer will be able to see that as table, it is not alligning the table rather it pushes the adjusent column values towards right.
Please let me know how to solve this.
azim
 
The easiest way to change color is to use conditional formatting.

Select the field in the report, right click and Format Field, select the Font Tab, and where you would set the color, click the x-2 button to the right.

Use a formula like
If {table.Field} > 500 then Red else Black.

The method you suggested will only work on strings if you have set HTML formatting on. it won't work on numbers. Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top