John, You can still use sum of in report expressions.
Razzak's CONCOMP report SubTotalsAndTotals show you both ways of calculating subtotals and totals. Once you have the subtotal/total value in a variable, you can calculate your average. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John > Docherty > Sent: Monday, August 30, 2004 8:16 PM > To: RBG7-L Mailing List > Subject: [RBG7-L] - RE: [RBG7-L] Calculating Variables Using Sums in > Reports > > Thanks for the help with the vertical lines - however another question: In > a > report I wish to calculate the average cost for an item which is based on > the sum of the cost of a series of subitems and the quantity for the first > subitem. As the SUM etc commands no longer seem to be accessible (having > been replaced by DBCALC) any advice on how to do this would be > appreciated. > The data is as follows:- > > QTY subitem COST > 5 a $50 > 10 b $100 > 15 c $10 > > Total cost: $160, and the average cost I want to show is > $160/5 > > All that is to appear in the report are the details associated with the > first subitem (a) (QTY and a description), the total cost including all > subitems and the average cost based on the quantity for the first subitem. > While I have no problem generating the total cost using the appropriate > break headers I cannot see how I can calculate the average. (This used to > be > possible in DOS where the 'sum of' was an accessible variable, but > apparently no longer.) > > Thank you. > > Regards, > > John Docherty
