× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Print Total Pages in Report
  • From: Rich Duzenbury <rduz@xxxxxxxxxxxxxxxxxxx>
  • Date: Fri, 09 Feb 2001 00:41:19 -0600

Two options:

1) You have to make another pass over your data and figure out how many 
pages there are before you build the spooled report, and then build the report

2) Create a spooled file with a 'place marker' for the total number of 
pages.  After the report is generated, retrieve the number of pages from 
the spooled file, and then read the original spool file (by api or cpysplf) 
and write a new one, replacing the place marker with the total pages.

It can be a lot of work to go through for not a lot of benefit.  Perhaps 
you can convince your users to just let you add a summary page, where you 
print something like - End of Report - xxx total pages.  As long as they 
get the summary page, they know they have the entire report.

Regards,
Rich

At 05:04 AM 2/9/01 +0000, you wrote:

>Hello all,
>We have an RPG program to print a detailed report  .
>The page number in the report is done automatically using the
>reserve word PAGE in the 'O' spec.
>Now, our user wants to indicate the total Number of pages after the
>page number on each page, ie, 'to show " Page 1 of 3 Pages" etc.,
>instead of  "Page 1, Page 2......".
>
>Can anyone advice us of how to go about this in RPG program?
>
>Thanks in advance,
>Viji

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.