[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQR last-page problem
Terry,
I've never tried exactly what you're doing, but you might
be able to get away with generating the first report,
switch over to the second report and give a new value to
#current-page and write the second report, and then switch
back to the first report and set #page-count to be the
highest page number printed _plus 1_.
For example, this little text program may demonstrate the
idea:
begin-program
do main
end-program
begin-heading 2
page-number (1,1) 'Page '
last-page () ' of ' '.'
end-heading
begin-procedure main
print 'Howdy' (1,1)
new-page
print 'Howdy' (1,1)
new-page
print 'Howdy' (1,1)
new-page
print 'Howdy' (1,1)
new-page
move 10 to #page-count
end-procedure
It produces this output:
Page 1 of 9.
Howdy
<ff>
Page 2 of 9.
Howdy
<ff>
Page 3 of 9.
Howdy
<ff>
Page 4 of 9.
Howdy
<ff>
Hope this helps.
Ray
> Hi,
>
> I am using SQR v4 for UNIX environment.
>
> I need to print out a single document consists of two different report
> layout. So I used 'use-report' to print the output onto the different
> report layout. The problem is I need to have "page <current-page> of
> <last-page>" on every page of this single document. With 'use-report'
> it will resets the <current page> to whatever page the report is
> currently on and it will also have two <last page> instead of one
>
> What I need is one continous sequence of current page and last page
> across two different report layouts because they afterall one document.
> I could program my own logic to work out the current page, but what
> about the last page?
> SQR prints out the page on the fly and there is no way of delay printing
> it or is there?
>
> The current method I could think of is to insert a '@@' in each page
> and then after the report is produced (I will have the last page value).
> Using UNIX commands to search and replace the '@@' with the last page
> value. But I feel it is not a neat way of doing it - does any experts
> out there have any insight??
>
> Please advise
>
> Many thanks in advance
>
>
> Terry Cheung - Bertelsmann mediaSystems
> BMG Distribution, Unit 24 Crystal Drive, Warley, West Midlands, B66 1QG,
> United Kingdom.
> * terry.cheung@bmg.co.uk
> * terry.cheung@bertelsmann.de
> * Tel: +(44)-121-543-4276
>
----------------------------------------------------------------------
Ray Ontko | Ray Ontko & Co | "Time for a new signature line."
rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/