PDA

View Full Version : conditional color on calculated field on a report


ABC123

Karyl Cardullo
01-12-2004, 08:12 PM
How do I change the color of a calculated field on a report based on the value of the calculated field. i.e. everything >= to a certain value is bold red.

Karyl

rtbtat
01-13-2004, 04:24 AM
Hello:

Go into report design, select the appropriate field, right-click with your mouse, and select Properties.

Then ............

Click on the Setup Tab
Go to Color and Font Equations
For now we'll deal only with color so ......
Place a check mark in the Color Equation Box
Click on the xy button on the right side of the box
Then choose a Text Color, background color, and once again, click on the xy box to create an expression Alpha will use to check for a specific condition.

For example, you may have a Bal_Due field on your report. You can create an expression that turns the font from black to let's say red if the following condition is true:

Bal_Due > 0

That means every balance due greater than zero will show up in red text, otherwise the text will be black. Anyway, that should give you a pretty good start on figuring out a solution.

Robert T

Stan Mathews
01-13-2004, 06:08 AM
Depending on the complexity of the calculated field to which you are applying the font color equation, I have found it useful in some instances to substitute the background calculation for the calculated field in the test instead of the calculated field name, expecially if the calculated field is built up from other calculated fields.

For example with the Bal_Due example as given, using the Bal_Due > 0, for instance, if Bal_Due is defined as Charges - Payments, you can make the conditional test for the font color equation be

Charges - Payments >0

This is just from my experience and might be a reflection of some other error I made.