[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Page 1 of xx
- Subject: Re: Page 1 of xx
- From: "Korbel Gordon E." <GEKORBEL@NORSTAN.COM>
- Date: Thu, 1 Oct 1998 13:22:54 -0500
Thanks for the very complete solution!!!
-Gordon
> -----Original Message-----
>
>
> There is a relatively easy way to accomplish the page numbering. My
> client has the same request to have multiple reports in one .lis with
> each one having 1 of xx (for each invoice).
>
> I was able to accomplish this by creating an array
>
> create-array name=array size=500
> field=lastpg:number
>
> and using it for substitution in the original .lis file. The header
> will contain
>
> print 'Page No.' (,+2)
> print #page-count (,) edit 999
> let $lastpage = ' of @@' || to_char(#array_pos)
> print $lastpage (,+1)
>
> which will be the position within the array. The array will have the
> value that is to be replaced. When the report is complete, the report
> is closed and the following will replace the array position with the
> actual number of thru pages.
>
> move $sqr-report to $save_report
> new-report 'junk.lis'
> open $save_report as 1 for-reading record=190:vary
> let $output = $save_report || '.new'
> open $output as 2 for-writing record=190:vary
> while 1
> read 1 into $string:190
> if #end-file
> break
> end-if
> if instr($string,'@@',1)
> unstring $string by '@@' into $page $marker
> if $marker <> $oldmarker
> let $lastpage = to_char(array.lastpg(to_number($marker)))
> move $marker to $oldmarker
> end-if
> let $page = $page || $lastpage
> write 2 from $page
> else
> write 2 from $string
> end-if
> end-while
> close 1
> close 2
> let $cmd = 'rm ' || $save_report
> Call system using $cmd #status
>
> Suzanne MacLaughlin
> COAD Solutions
>
>
>
> ---"Korbel Gordon E." wrote:
> >
> > This won't work for me because each invoice in the report starts on
> page '1'
> > -- that is, in a ten page report, I might have four distinct
> invoices all of
> > which need page 1 of xx on the first page of that particular invoice.
> >
> > I suspect there is no easy way...
> >
> > Thanks for the help!
> >
> > -Gordon Korbel
> >
> > > -----Original Message-----
> > > print 'Page ' (4,63)
> > > page-number (4)
> > > print ' of ' (4)
> > > last-page (4)
> > >
> > > I hope this helps.
> > >
> > ---------
> > > Hi all,
> > > Platform: Sybase
> > > SQR Version: 3.0.18.1.1
> > > I'm working with Peoplesoft and SQR, and I need some help!
> > > The Peoplesoft provided invoice contains a page # field -- The
> users here
> > > have requested that I modify that so it reads, per invoice, Page 1
> of xx.
> > > Is there some trick of which I am unaware, or is this probably
> going to be
> > > as difficult as I think it will be?
> > > Thanks in advance!
> > > -Gordon Korbel
> >
>
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com