We used to generate a crystal report listing items sold to each customer with TotalDollarsSold, TotalGrossProfitPercent. It shows the data is all pulled from the table of SO_CustomerSlsHistByItemWrk. Now I'm trying to dump all data into an excel file directly so as to be able to pivot data easilier, but don't know how the fields of TotalDollarsSold and TotalGrossProfitPercent can be queried / calculated, which should be based on the granularity of customer and item (GROUP BY CustomerNo, ItemCode) .Would someone be able to advise? Thanks!