Re: Subtotals in REPORT...
Posted in 1996
Hannah Sobie Fiabema wrote:
>
> Gurus,
> I am trying to generate this report. The SELECT is:
>
>
> SELECT caseNo, ....
> FROM table
> ORDER BY caseNo[6,8]>
> In the report I want subtotals group by those three bytes in caseNo.
> My statement is : AFTER GROUP OF xRec.caseNo[6,8] ... this proves to be
> a problem, it generates a syntax error.
> Is there an elegant solution or will I have to use brute force to achieve
> the desired result?
>
> Thanks in adv.
> Please respond to kgl@eagle.dol-esa.gov
Simple solution is to assign caseNo[6,8] to a variable
before the output to report statement & use it in the report
order by and group statements.
Although the select statement works, I think I would have done it
like so because I almost expect the "order by must be in select list"
error:
select caseNo[6,8], caseNo ... (assuming you need the entire caseno)
from table
order by 1
then of course you still need another variable or record element
to select it into.
--
Sincerly,
Doug Wilson(dougw@amgen.com)
*** The opinions expressed here are my own and not neccessarily ***
*** that of a rational human being . . . *************
*** Disclaimer: These are the opinions of the poster not Amgen Inc.***