Bill Try (avg(sugar)) from scrnData WHERE entry = entry Dawn -----Original Message----- From: Bill Niehaus [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 12:40 PM To: RBG7-L Mailing List Subject: [RBG7-L] - RE: Rbase 7.1 report with functions
When I try this command: (avg (sugar) FROM scrnData WHERE entry = entry) I get an error: Column or variable AVG not found (2515). I am doing this in the Report Designer under Variable, Add/edit variables. Bill >>> [EMAIL PROTECTED] 8/15/2004 8:18:04 PM >>> Bill - You can create a report variable as an aggregate function: vAverage = (AVG(Columnname)) FROM tableview WHERE ... vAverageDifference = (Columnname - .vAverage) The key to using aggregate functions in a report lookup is to enclose the aggregate function within its own set of parens. Sami ------------------------------------------ Sami Aaron Software Management Specialists 19312 W 63rd Terr Shawnee KS 66218 913-915-1971 mailto:[EMAIL PROTECTED] www.softwaremgmt.com > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Bill > Niehaus > Sent: Sunday, August 15, 2004 11:36 AM > To: RBG7-L Mailing List > Subject: [RBG7-L] - Rbase 7.1 report with functions > > > I would like to display a report with a value from a table along with an > average for a group of values from the same table. Then I would like to > subtract the average from the current value. I'm not sure how to get > an average calculated and into a report. > > Thanks. > > Bill Niehaus > > > >
