Print page number – RPGLe

895 pts.
Tags:
AS/400
AS/400 printing
Printer files
hi,

i want to know how i can print the page number on the report on the top right corner of the page when new page begins.

i'm using O spec.

OQPRINT    E   N50      HDR2              3                 O                                           07 @Pgm  O                       compname            77              O                                          105 'PAGE:'      O                       PAGE          Z    110         

My logic is to print this header only once at the top as it has company name and program name info...that's y i have indicator to switch on once this header is printed at the begining of the report.

now the problem is i also have page number in this header so it prints only once ....but i want it to be printed on every new printer page..

is this something done with the overflow indicator..can any1 explain how to achieve this?

thanks,

NG    



Software/Hardware used:
AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.

- Use the Reserved word PAGE or PAGE1 —> PAGE8
Charlie Brown — restored entry
————————————-
Gee .. we generally want to print the header on every page…
So EXCEPT HDR2 for the first page and EXCEPT HDR3 for subsequent pages

O QPRINT E HDR3 3
O 105 ‘PAGE:’
O PAGE Z 110

Here’s the overflow routine…
If *inof = *on
Except HDR3
eval *inof = *off
Endif

Phil

——————
so how to .. Page 1 of 1
That’s always the next question!
It’s not pretty.
Easy for MS Word .. it’s already formated the entire document so it knows how long it will be.
But when you’re printing the header to page 1
you don’t know how many pages/lines will follow … unless

Here is one of many discussions on it.

http://itknowledgeexchange.techtarget.com/itanswers/how-to-display-page-1-of-n/

Phil

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Nutangujar
    thanks you all...how can i make it the formate Page 1 of 1 i just use Page 1 currently
    895 pointsBadges:
    report
  • Nutangujar
    thanks Phil. Thanks you all!!!
    895 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following