Solved

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

Posted on 2002-07-20
1
342 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

820 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