Thanks for the assistance with the SUM of command. 

The problem I had was that I did not set the type when setting up the
variable (as this usually defaults to the correct type when creating a
simple = type variable), however when entering SUM OF ... all that I got was
an error message (2515) telling me that a column or variable was not found.
Having tried numerous variations on this (and missed the correct sample
report in CONCOMP) I assumed that this was no longer available, however
thanks to the assistance I now have this working, as per V6.5++.

Perhaps the error message could be altered to suggest that the type needs to
be set before adding a variable that uses a function. 

Thank you.
 
Regards,
 
John Docherty

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Claudine
Robbins
Sent: Wednesday, 1 September 2004 1:36 a.m.
To: RBG7-L Mailing List
Subject: [RBG7-L] - RE: [RBG7-L] Calculating Variables Using Sums in Reports

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

Reply via email to