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

Help with Crystal Report - formula ?

Status
Not open for further replies.

JohnBairner

Technical User
Oct 14, 2003
4
GB
Hi I am trying to create the following report.
The report will query a field called {sales_transaction.transaction_type} with in this field there are 3 responses 1 = sr 4 = si 5 = cr
The report needs to show the amounts referring to the response.
ie.
sr amount £10.00
si amount £5.50
cr amount -£12.50
can any one help
Thanks
John.
 
hi

if {sales_transaction.transaction_type} =1 then

else if {sales_transaction.transaction_type}=4 then

else if {sales_transaction.transaction_type}=5 then


by by

i hope this help you

yosi
éåñé


 
You can also use Select Case as follows
Open the Report Goto Insert Field Object --> Right Click on Formula Field --> New
Give a name to Formula..then give the formula as


Select {sales_transaction.transaction_type}
Case "sr":
10.00

Case "si":
5.50
Case "cr":
-12.50

If you insert this formulae in report , it should give you what you were looking for

Regards,
Deepak
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top