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

Help with Sum in Crystal 8.5

Status
Not open for further replies.

cis12232004

Technical User
Apr 13, 2005
57
BS
I created this formula to calculate the sum of the invoices for each inventory item. The invoice represents the inventory items that left the warehouse during a particular period.

if GroupName ({vr_10630.TranType}) = "IN" then
Sum ({@PStockQty}, {vr_10630.SiteID})

@PStockQty represents the amount taken from stock
vr_10630.SiteID represents the site the invoice pertains to (we have 2)

"IN" represents invoices.

This formula gives these results:

Site ID Total 28
IN

Invoice EACH -2 -2
Invoice EACH -4 -4
Invoice EACH -1 -1
Invoice EACH -1 -1

RC

Receipt EACH 40 40

IN

Invoice EACH -2 -2
Invoice EACH -2 -2

As you can see it is facturing in the receipt of 40 items when I don't want that. I just want the sum of all invoices and when there was no invoices processed for that ID, a want a result of zero.

Any ideas how I can do this?


 
I'm not clear to me what you want, but a summary total cannot be conditional. The simplest answer is to use a running total, which can apply a suitable formula.

Right-click on a field and choose Insert to get a choice of Running Total or Summary.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top