Link to home
Start Free TrialLog in
Avatar of r_venkatadhri
r_venkatadhri

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of gnrao
gnrao

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial