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

[sqr-users] SQR Page x of n for multiple reports in a single LISfile.



Hi,
 
I am currently experiencing a problem attempting to produce page numbers
in the format "page x of n" for a report header, where the report
contains multiple statements.  The SQR process is generating a batch of
statements, all of which are processed and output to the same .lis file
to make printing the batch easier (i.e new-page forced between
statements and #page-count reset).  The problem is that I have no easy
way of determining how many pages are going to be printed per statement
within the batch.  Using Last-Page and manipulating #page-count as shown
in the following code, does not provide a solution:
 
begin-heading 1
    page-number (1,1) 'Page '
    last-page () ' of ' '.'
end-heading
 
begin-program
print 'Header should read: Page 1 of 2.' (10, 10)
print 'Statement 1' (11,10)
new-page
print 'Header should read: Page 2 of 2' (10,10)
print 'Statement 1' (11,10)
new-page
move 1 to #page-count        !reset page counter.
print 'Header should read: Page 1 of 4' (10,10)
print 'Statement 2' (11,10)
new-page
print 'Header should read: Page 2 of 4' (10,10)
print 'Statement 2' (11,10)
new-page
print 'Header should read: Page 3 of 4' (10,10)
print 'Statement 2' (11,10)
new-page
print 'Header should read: Page 4 of 4' (10,10)
print 'Statement 2' (11,10) 
end-program
 
This generates the following result:
 
Statement 1:    2 pages            Header reads Page 2 of 4, when it
should be Page 2 of 2.    
Statement 2:    4 pages            Header correct for page x of 4.
 
The second statement in the .lis file thus has the correct number of
pages, however, the first statement in the .lis file has its total
number of pages shown as being 4 (the last value of #page-count when the
report was completed).  If you have n statements in the batch, then all
statement headers will have the total number of pages determined by the
last statement generated in the process.  Does anyone have a simple
solution for this problem?  I wish to avoid having to do complex
calculations to pre-determine the number of pages that will be used by
any statement.  I would also like to avoid creating a single file per
statements using the new-report command.
 
Details of the platform that I am running this on appear as follows:
 
Platform:          WINDOWS-XP Professional Version 2002 SP1
SQR Version:   SQR for PeopleSoft/8.44.12     /PC/Windows NT 4.0/Oracle
8.0.6/Jul 13 2004
Database:        Oracle 9.2.0.1
Application:      PeopleSoft 8.44.12

Thank you.
 
Regards,
 

Graeme Steyn 
Corporate Information Systems 
Information Technology Division 
Central Queensland University 
Tel: +61 7 4930 9256 
E-mail: g.steyn@cqu.edu.au 

 

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users