Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Formula and Using Crystal Syntax

Status
Not open for further replies.

dickylam

IS-IT--Management
Jun 24, 2001
86
I am using Crystal Report Developer 8.5 to develop report with database of SQL server. I use Visual Foxpro as front-end.

While I am designing report in cr85. I face a problem. This problem is:-

I have the column
Date,reference,description,debit,credit

In the table, the fields are:-
table
reference
description
amount

The field amount hold either positive for debit and negative for credit.

However, when I am desiging report, I also put the column like this:-

Date Reference Description Debit Credit
-------------------------------------------------------
date reference description amount amount

You will see I have put amount field 2 times on debit and credit.

Now I want to write a simple condition to suppress the amount in debit column if the value is < 0 and suppress the amount in credit column if the value is >0.

After I tried many ways such as whileprintingrecords, supress in format field, ... I still not able to do this.

Can anyone please help me to solve this.


Thanks.
 
Have you tried the Suppress formula under the [Common] tab from the [Format Editor]? That's always worked fine for me.

Madawc Williams
East Anglia, Great Britain
 
As Madawc suggests, you should be able to click on the debit column amount field and use format field->common->suppress->X+2 and enter:

{yourtable.amount} < 0

And then click on the credit column amount field and enter:

{yourtable.amount} > 0

-LB
 
Thanks Madawc and lbass. I got how to do it.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top