[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Multiple On-Break reporting
- Subject: Re: Multiple On-Break reporting
- From: Michelle Tani <mmtani@LBL.GOV>
- Date: Thu, 10 Sep 1998 08:29:29 -0700
- Organization: Lawrence Berkeley Laboratory
- References: <s5f78ecb.095@AVIS.COM>
Darwin,
I have run into this problem before, too. I'm not sure if my solution
was the best or most elegant one, but it worked.
I stored the totals is #variables, so that when the after procedure is
called, I'm not printing &variable values for the next selected record.
For some reason, it seems the #variable is not re-assigned until after
the after procedure is executed. So the #variable values are the ones
we want.
I hope that made sense. I, too, am a rookie so you could e-mail me
direct if you prefer to discuss this offline.
Michelle Tani
Lawrence Berkeley National Laboratories
mmtani@lbl.gov
(510) 495-2948
Darwin Anderson wrote:
>
> Hi
>
> I'm trying to write a report in SQRW 3.0.13.2 on SYBASE
> 11.0.2.1 (EBF 6717 - Sun Solaris 2.6).
>
> Essentially, it is not subtotaling properly. There are 5 levels
> from Company (highest - major), Area, Operation, District,
> Emplid (lowest). When fields break I want all lower break
> fields to be subtotaled on the same page.
>
> If I list the break fields from minor to major level, the final
> (overall report) subtotaling appears to work but the
> intermediate breaks are incorrect. E.g., when an Operation
> break occurs the District subtotal prints (with good totals),
> goes to a new page and then the District subtotal prints with
> values initialized to zero followed by the Operation subtotal
> line (with good totals) followed by a new page.
>
> If I list the break fields from major to minor level, the opposite
> occurs - the intermediate breaks subtotal as desired, but the
> final subtotals are spread over multiple pages.
>
> I'm only using After=<procedure> syntax.
>
> Also, after the final company, I want to print a "Grand Totals"
> line on the same page instead of going to a new-page;
> otherwise, I want to go to a new page when the company
> value changes.
>
> If you want to see the code please contact me at the
> email address/phone number below and I'll forward to you.
> For now I'll spare uninterested list members the agony of my
> rookie code.
>
> Thanks in advance,
> Darwin Anderson
> dander03@avis.com
> (516) 222-3064