I need to create a forecast report that gives an estimate of how much of an inventory item should be purchased in order to have enough on hand for the following month.
Besides pulling up information (like how much onHand, onPurchaseOrder, onSalesOrder and onBackOrder - which are easy enough) straight from a table, my purchase amount number is calculated by averaging the "sold" amount from the previous 3 months (periods). Periods are based on a fiscal year that begins in June (Period 1 = July).
So, if I were to pull the report today (August=Period 2), my purchase amount number would be calculated like so: [(QtySoldPeriod1 + QtySoldPeriod12 + QtySoldPeriod11) / 3]. But you see, I would need to pull QtySoldPeriod12 and QtySoldPeriod11, where the "year" is 2003 (that field is available in the table where QtySoldPeriod12 is located by the way)...
I'm working off of four tables imported from MAS200:
IM1 - InventoryMasterFile (average cost, item description..etc)
IM2 - InventoryItemDetail (onHand, onPO, etc...)
IM3 - ItemSalesDetail (this has the two fields that tell me how much was sold in each period and what year it corresponds to)
IM0 - Parameter Record (this table tells us what period we're in and the current year - seperate fields)
I understand the logic behind the data I need - I just don't know the syntax or where the code must go (in a query, or in the actual report - and if on the report, where?)
I hope this is clear...and I hope someone out there can help!
Sandy
Besides pulling up information (like how much onHand, onPurchaseOrder, onSalesOrder and onBackOrder - which are easy enough) straight from a table, my purchase amount number is calculated by averaging the "sold" amount from the previous 3 months (periods). Periods are based on a fiscal year that begins in June (Period 1 = July).
So, if I were to pull the report today (August=Period 2), my purchase amount number would be calculated like so: [(QtySoldPeriod1 + QtySoldPeriod12 + QtySoldPeriod11) / 3]. But you see, I would need to pull QtySoldPeriod12 and QtySoldPeriod11, where the "year" is 2003 (that field is available in the table where QtySoldPeriod12 is located by the way)...
I'm working off of four tables imported from MAS200:
IM1 - InventoryMasterFile (average cost, item description..etc)
IM2 - InventoryItemDetail (onHand, onPO, etc...)
IM3 - ItemSalesDetail (this has the two fields that tell me how much was sold in each period and what year it corresponds to)
IM0 - Parameter Record (this table tells us what period we're in and the current year - seperate fields)
I understand the logic behind the data I need - I just don't know the syntax or where the code must go (in a query, or in the actual report - and if on the report, where?)
I hope this is clear...and I hope someone out there can help!
Sandy