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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report Formulas 1

Status
Not open for further replies.

hpsingh

Programmer
Feb 27, 2002
13
IN
I am using CR8. There are two colums named "type" and "amount" in a table. The value of type can be "DR" or "CR".
I want to have two columns in my report with headings as "Debit" and "Credit" and want to show the value of amount column of the table in Debit column of the report if the value of type column in the table is "DR" and in Credit if type is "CR". Suggestions are welcome.
 
Hi !

One way is to make two formula fields:

@Debit
if {table.type} = 'DR' then
{table.amount}

@Credit
if {table.type} = 'CR' then
{table.amount}

Insert the two fields and format them with
"Supress if Zero"

Hope this will help you

/Goran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top