Re: Subtotals in REPORT...
Posted in 1996
>> 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?
In a 4gl report, this is fairly simple to accomplish (as against Ace,
where I'm not so sure)
Just send another variable to the REPORT. For example,
.
.
LET l_sort = caseNo[6,8]
OUTPUT TO REPORT xxx (variables..., l_sort)
.
Then, within the report
ORDER EXTERNAL BY l_sort
.
.
AFTER GROUP OF l_sort
.
.
Hope this helps.
------------------------------------------
Rudy Fernandes
Gulf Insurance Co., KUWAIT
------------------------------------------