• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 363
  • Last Modified:

crystal report formula field to display results in red based on conditions

I am using Crystal reports to display the results from the MS Access Data base and calling the rpt file from VB.

I am using the following Crystal Syntax in a formula field in the crystal report to display the Credit or debit balance.

stringVar balance := "" ;
numberVar x := {PartyBalance.CreditBalance};
numberVar y := -{PartyBalance.DebitBalance} ;
if y < x then
    balance := x & "  Cr"
else
    balance := y & "  De"

The code works fine as expected. I WANT TO DISPLAY THE BALANCE IN RED COLOR(that is if y < x in the above code)  IF IT IS A CREDIT BALANCE. How can I do this?
0
r_venkatadhri
Asked:
r_venkatadhri
1 Solution
 
gnraoCommented:
In Crystal report designer, format the formula object. In format editor, font tab, you have a color cobmo. You can define the color using the formula there by clicking the icon.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now