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!

Formula to calculate total

Status
Not open for further replies.

Melzer

Technical User
Jul 30, 2001
11
US
Using crystal 7. I have two fields: Ordernum and orderamt
Problem is orderamt only caculates cumulative amounts:

Ex.: Order 1 for $100
Order 1a for $100

Comes out as Ordernum Orderamt
1 100
1a 200

I need a report that shows the actual amount of Order 1a. I've tried using a formula with Prev() which works great if I'm running a report based on Ordernum but if I need a report by date range (in the above example Order 1 is in June and Order 1a in August, I run the report only using Aug Orders) then the Prev() isn't going to work for me.

Any suggestions?
 
Is OrderAmt a database field, formula or running total? Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
So the table stores the cumulative amount, but not the increment? That is an unusual scenario.

If you need to calculat the increment from the cumulative amount, without having the previous record, then I don't know of a way.
You will have to keep the records together. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top