Solved

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

Posted on 2002-07-20
1
338 Views
Last Modified: 2013-12-25
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
Comment
Question by:r_venkatadhri
1 Comment
 

Accepted Solution

by:
gnrao earned 100 total points
ID: 7171964
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now