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!

Running Total From a Formula 1

Status
Not open for further replies.

piazzab

Instructor
Oct 22, 2001
14
US
I need to calculate the qtyonhand inventory - qtyordered = available inventory. Then I need to take the available - qtyordered = available on the next line item, etc. How do I do this?

QTY ON HAND 10,000
QTY ORDERED 9,000
AVAILABLE 1,000

QTY ORDERED 500
AVAILABLE 500

etc.
 
Create a running total {#orders} using the running total editor. Select {table.orderqty}, sum, evaluate on each record, reset never. Then create a formula {@available}:

{table.inventory} - {#orders}

You could lay this out like:

{table.inventory} {table.orderqty} {@available}
10,000 9,000 1,000
500 500

Suppress {table.inventory} using "Not Onfirstrecord" in the field suppress formula area.

Or if the issue is that you want the layout you show above, then just create three detail sections, add the labels on the left (again suppressing the inventory label using "not onfirstrecord" and the fields next to them to get:

detail_a: Inventory: 10,000
detail_b: Order Qty: 9,000
detail_c: Available: 1,000
detail_a:
detail_b: Order Qty: 500
detail_c: Available: 500

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top