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

Need a formula that tells me when the stockqty is 0 or less

Status
Not open for further replies.

stillsteam

Programmer
Apr 2, 2004
52
SE
Hello
CR8.5 and Sql Server
I have a report grouped on Item and in the detail section av have orders and their shipping date. In the GH I also have the current stock qty for each item.
I need to know when to purchase new items.

This is what it looks like today
GH
Item StockQty
1 200
Detail
Order Amount Shipping date
1001 20 2005-03-20
1002 100 2005-04-01
1003 200 2005-05-01

I need it to look like this in the detailed section

Order Amount Shipping date Qty left
1001 20 2005-03-20 180
1002 100 2005-04-01 80
1003 200 2005-05-01 -120

It can be any number of orders per item and even zero
Maybe this is simple to solve but I haven´t been able to do it.

Thank you in advance
Jonas
 
You could use the running total {#amt} expert to create a running total of amount, where you choose sum of amount, evaluate for each record, reset on change of group. Then create a formula {@QtyLeft}:

{table.stockqty} - {#amt}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top