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

Conditional Font Formatting on Running Total Field 1

Status
Not open for further replies.

random621

Technical User
Jul 16, 2003
54
US
I have a basic report that uses running totals to summarize montly profit/loss achieved by each rep in our company. There is 1 Group (Rep) and the details section displays each client and what their rep helped them earn (profit/loss).

In my running total field (located in Group 1 Footer) I show the net profit/loss. I want to use conditional formatting (X2 button) to BOLD the items that are greater then 0.

After clicking on X2 button for Bold, I enter {#RunningTotal PnL} > 0. I get the error message "The Formula Result Must be a Number".

If I build a formula field that says:
if {#RunningTotal PnL} > 0 then 1 else 2 the formula field works fine.

Why will a formula field work to display 1 or 2, but a Conditional Formatting on the running total field itself using similar logic will not work?

I am using Crystal 8.5.0.217.
Running report against an access DB.
 
Your formula:

{#RunningTotal PnL} > 0

doesn't tell CR what style you want to adopt. You'll notice that font style has a dropdown list. What you select here will be overridden by what you put in the formula area, and will only apply if your formula does not apply, e.g., if there were a null and your formula did not account for it. So your formula needs to tell CR what you want to happen when the formula is true. You can use numbers, although I'm not sure how they correspond to the various styles, or you can use the styles themselves, as in:

if {#RunningTotal PnL} > 0 then crBold else crRegular

Using the style names allows you to see the logic.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top