You do require a formula to calculate this value. It is not a field that is stored in the IC65A database, thus it doesn't appear in Quik Reports for Windows table.

The formula basically checks that if the qty on hand is not zero, then it divides the total cost for the item by the total quantity.

If you do not use LIFO/FIFO items, the syntax is easy:

If {IC65 Items.Quantities[1]} <> 0
then {IC65 Items.Costs[1]}/{IC65 Items.Quantities[1]}
else 0

Should you have LIFO/FIFO items, there could be multiple costing lots with qty/cost information. You have to total all of the lots and divide the total cost by the total qty:

If Sum[{Quantities[1]},{Quantities[2]},{Quantities[3]},{Quantities[4]},{Quantities[5]}] <> 0
then Sum[{Costs[1]},{Costs[2]},{Costs[3]},{Costs[4]},{Costs[5]}] / Sum[{Quantities[1]},{Quantities[2]},{Quantities[3]},{Quantities[4]},{Quantities[5]}]
else 0

To get completely accurate values, you have to make sure that Day End Processing is done in IC65A to account for Qty Shipped not Costed values, or add this to the formula above. Alternately, you can calculate the total qty in one formula, the total cost in a second formula, and the average cost in a third.

Regards,
Softrak Support

[This message has been edited by Softrak Support (edited 03-23-2001).]