[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: On-break, Multiple page breaks



What you appear to need is a report with only 2 break levels, one on
Business_unit/Fund-Code and one on Account.  There are probably many ways to
accomplish this, but one that comes to mind quickly is to select
business_unit and fundcode as one concatenated field, and use this field as
your 1st level break control.  you would continue to select the fields
individually to minimize code changes, but you would need to move them
further down in the select and remove the on-break clause from them, as well
as change your order by clause.  Here is an example (using Oracle syntax):

        begin-SELECT    
        CONCAT(A.BUSINESS_UNIT_IU,B.FUND_CODE)  &BU_Fund_Code () on-break
print=never level=1 after=New-Page 
        B.ACCOUNT (+1,#1) on-break print=change/top-page level=2 skiplines=1
after=Print-Totals
        A.BUSINESS_UNIT_IU   () 
        B.FUND_CODE      () 



> -----Original Message-----
> From: Chavira, Denise [SMTP:Dchavira@STATE.MT.US]
> Sent: Thursday, December 17, 1998 1:27 PM
> To:   Multiple recipients of list SQR-USERS
> Subject:      On-break, Multiple page breaks
> 
> I am having some difficulty with my on-break code. I am required to print
> a
> report that prints a new page at each new business unit (level 1), each
> new
> fund code (level 2), and skiplines and sum amounts at every change in
> account (level 3).  The problem is that if both BU and fund code change at
> the same time, I get an extra blank page (header only) between the change
> in
> BU and fund.  My code is as follows:
>  
> begin-SELECT    
> A.BUSINESS_UNIT_IU   () on-break print=never level=1 after=New-Page 
> B.FUND_CODE      () on-break print=never level=2 after=New-Page      
> B.ACCOUNT (+1,#1) on-break print=change/top-page level=3 skiplines=1
> after=Print-Totals
>  
> The procedure New-Page is just that, new-page. I also am ordering by BU
> and
> then Fund Code. I have tried switching levels and making both BU and Fund
> level 1 but that doesn't work either. It is necessary that I use new-page
> for both BU and fund code because any combination of BU and fund code is
> possible. Is there a way to use before instead of after or switch the
> levels
> another way to make it work? Any input would be greatly appreciated. Thank
> you.
>  
> DC