[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 191
  • Last Modified:

Rolling Twelve Month Count

This inventory report shows all "Item Numbers" that have fallen below their set "Reorder Point." This report allows our parts manager to walk the aisles and confirm quantities before placing an order. The report uses the "Inventory" table to produce these numbers.

He would find it very helpful if I could display a rolling twelve month count of the number (or quantity) of each item sold. To do this, I'll need to incorporate the "Invoices" table and loop through the table getting a count (over the last twelve months) of the number sold for each Item Number. For example; maybe we sold 14 of Item#1101600030 and 33 of Item#1102400016 and 0 of Item#1102400017 (the first three records below).

Parts Order Report
I've not encountered a situation like this before (in Crystal). What is the best way to go about getting a count for the number of each item sold...keeping in mind that it cannot change record selection as the report is meant to display items that have fallen below their Reorder Point. For those items, I only wish to display how many of each were sold over the last twelve months.
0
Bad_Fish
Asked:
Bad_Fish
2 Solutions
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
One option is to place in that column a linked subreport (or a correlated SQL Expression) that returns the desired total.

Another option is to do an outer join to the "invoices" table, group on Item Number.  Show the item row data in the Group Footer, and display a conditional total (condition being on the invoice data range) of the quantity from the invoice also in the group footer.
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Forgot to mention: consider adding a ratio to the report of (12*On Hand)/(12 Month Sales).
This would allow the manager to easily recognize how many months of inventory you have on hand.
0
 
vastoCommented:
Create a view which groups the data by item and calculates the count. Set the where clause to the last 12 months. Join the view with your current data by the item's id ...
0
 
mlmccCommented:
Building on IdoMillet's idea of the conditional sum

Add a group on the Item Number.  
Suppress the group header and footer

You can build a formula like
If {InvoiceDate} >= DateAdd('yyyy',-1,CurrentDate) Then
    {InvoiceQty}
Else
    0

Open in new window


You could then use a summary on the formula to get the total sold in the time frame.  Put the summary in the detail section.

mlmcc
0
 
Bad_FishAuthor Commented:
I employed IdoMillet's suggestion and it works great. Thanks to everyone!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now