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.CreditBalanc e};
numberVar y := -{PartyBalance.DebitBalanc e} ;
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?
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.CreditBalanc
numberVar y := -{PartyBalance.DebitBalanc
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.