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!

Totals\formulas

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am developing a report to show how much each order and every change to that order was. The database I'm working in only stores the current total sum of the order. How can I show in my report the original amount of the order and then the amount of each change to it? The report will consist of hundreds of orders which in turn can have numerous changes.
 
We would need to know more about the tables and fields involved.
Is the order amount in the same table as the change amount?
Is it the same field?
Is there a one to many relationship between an orders table and a changes table? Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
The order amount and the changes amount are the same field in the same table. I have tried to take that table and make an alias but I still run into the same problem since the amount field in that table is always going to contain the current Grand total amount. I've even tried a formula where I subtract the Grand total amount from the original order amount but that only helps if I have just one change, (e.g., original amount is $100, change amount is $100), so using the formula I get the correct amounts BUT, if i have more than one change (e.g., Original is $100, first change is $100, Second change is $100) then it doesn't work, it shows the second change as being for $200 (since the formula is total current amount - original amount-$300-100 is $200). I truly would appreciate any help you could give.
 
If you have a way to distinguish them, you can create two separate columns out of the one column.

Use 2 if-then-else formulas like the following:

if {type} = "Change" then {Amount} else 0

You can then do totals, net formulas or running totals of either column or a combination of the two.
Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top