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

Crystal Reports: Setting color in concantenated formula 1

Status
Not open for further replies.

novicius

Instructor
May 13, 2004
8
0
0
US
Hi all,

Say, a question regarding using color in Crystal Reports. I've looked up the color tags or attributes for changing color (crBlue, for example) -- only I can't figure out how to implement it. Any ideas?

Here's a concantenated sample formula:

{Customer.CustomerName} & " (" & ToText({Orders.OrderID}) & ")"

How would I make only the {Orders.OrderID} field text turn blue (without using HTML, using the crBlue tag)?

Thoughts, ideas, opinions...?

- novicius -
 
Instead of using a formula, add your 2 fields into a text object. You can add the open and close parenthesis on either side of the date field. You can then highlight the date field, right click, and format the field to use blue as the font color.

~Brian
 
Ah, excellent idea Brian, thanks for the response!

But still, how does one use the crBlue color tags in formulas...?

- novicius -
 
Right click a field on your report and choose format field.
Choose the font tab.
Click the X+2 button to the right of color.
Enter your logic to determine how the field should colored.
For example:

if {table.order_total} > 5000 then
crBlue
else
crBlack

Save and Close.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top