[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] Page Break getting weird
- Subject: Re: [sqr-users] Page Break getting weird
- From: Don Mellen <donm@ontko.com>
- Date: Fri, 20 Feb 2004 11:20:38 -0500 (EST)
- In-reply-to: <Law10-F121JhKPc99ir0004e4b0@hotmail.com>
- List-id: This list is for discussion about the SQR database reporting language from Hyperion. <sqr-users.sqrug.org>
Not sure if you were sending complete procedures or not. If the after
procedures are complete, try something like...
BEGIN-SELECT DISTINCT
EE.COMPANY () on-break PRINT=never
EE.DEPTID () on-break PRINT=never after=Dept-Change
............
BEGIN-PROCEDURE Dept-Change
DO Print-Employee-Counts
NEW-PAGE ! I added this for page break after each dept
DO Initialize-Subheading
END-PROCEDURE Dept-Change
If, however, there's more processing in each of the after procedures, then
remove the NEW-PAGE command from Company-Change, make the same changes as
above to Dept-Change, and try this....
BEGIN-SELECT DISTINCT
EE.COMPANY () on-break PRINT=never after=Company-Change level=1
EE.DEPTID () on-break PRINT=never after=Dept-Change level=2
............
HTH,
-----------------------------------------------------------------------
Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
donm@ontko.com | "In the beginning, there was nothing, which exploded"
On Fri, 20 Feb 2004, abhay sachar wrote:
> I am new to SQRs, and have this task -
> in PeopleSoft delivered report PER012 - we made it Department Listings,
> we've done changes so that all employees for each dept (within a company)
> and the total no. of employees for the dept. are shown on 1 page, and each
> dept within a company need to be shown on a new page, and then when the
> comapny changes, it starts from a new company.
>
> It should be like - i.e.
> A company
> A Dept 1
> totalsA1
> New Page
> A Dept 2
> totalsA2
>
> New Page
> B company
> B Dept 1
> totalsB1
> New Page
> B Dept 2
> totalsB2
> and so on......
>
>
> Here is the code -
>
> BEGIN-SELECT DISTINCT
> EE.COMPANY () on-break PRINT=never after=Company-Change
> EE.DEPTID () on-break PRINT=never after=Dept-Change
> ............
> ............
> ............
>
> FROM PS_EMPLOYEES EE
> ............
> ............
>
> BEGIN-procedure Company-Change
> NEW-PAGE
> END-PROCEDURE !Company-Change
>
> BEGIN-PROCEDURE Dept-Change
> DO Print-Employee-Counts
> IF #current-line >= 51 !ensure a minimum of 2 employees is listed
> NEW-PAGE
> ELSE
> POSITION (+3)
> END-IF
> NEW-PAGE ! I added this for page break after each dept
> DO Initialize-Subheading
> END-PROCEDURE Dept-Change
>
> The code which is almost doing it, well almost because it works fine for all
> depts within a company except, when it reaches the last dept, it displays
> the list of employees, but the total shifts to the next page.
> This happens only for the last dept for each company, which is really weird.
>
> I tried changing the code on a friends's suggestion - to changing the order
> in selct like -
> BEGIN-SELECT DISTINCT
> EE.DEPTID () on-break PRINT=never after=Dept-Change
> EE.COMPANY () on-break PRINT=never after=Company-Change
>
> but what this does, is that it takes the totals up on the same page where
> the employees are, (for the last dept. in a company), but on the next page,
> just displayes the sub-header for the departments and starts printing the
> employee list for the new dept for the new company from the page after the
> next page.
>
> Please help.
>
> Thanks,
> Abhay Sachar.
> sachar_abhay@hotmail.com.
>
> _________________________________________________________________
> Contact brides & grooms FREE! http://www.shaadi.com/ptnr.php?ptnr=hmltag
> Only on www.shaadi.com. Register now!
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users