The Inventory Valuation report available from the inventory menu has all of these except the margin, and will output in csv form.. Putting an extra column in there should be easy enough if you look at how the InventoryValuation.php script works changing it for your needs should be easy enough.