Question on AT TOP OF PAGE / AT END OF PAGE statement

Hi,

Is it possible to have more than one AT TOP OF PAGE / AT END OF PAGE statement for a single report in the same program?

OR is it restricted to have only one AT TOP OF PAGE / AT END OF PAGE statement per report per program?

Thanks,
Selva.

Hello Selva!

Only one AT TOP/END OF PAGE is permitted per report and program. Otherwise you’ll get one of the following Errors:

Do you really want to use more than one?

I even haven’t ever seen a sheet of paper with more than one top side and more than one bottom side! :wink:

If you mean conditional page headers and footers, you can of course implement these:

 AT TOP OF PAGE
DECIDE FOR FIRST CONDITION
WHEN condition1
  page header 1
WHEN condition2
  page header 2
...
WHEN NONE
...
END-DECIDE
END-TOPPAGE

But be aware: before changing the condition values issue a NEWPAGE, as the condition is evaluated just before the first line on the page is printed. For AT END OF PAGE the condition is evaluated just before executing the NEWPAGE.

Thanks for the replies

Regards,
Selva.

[quote="Wilfried B

Actually you can have one set of AT TOP and AT END for each report like this:

AT TOP OF PAGE (0)
Write ‘Top of screen’

AT TOP OF PAGE (1)
Write ‘Top of page on list 1’


Edit:
Okay after posting I saw that you question was restricted to a single report, sorry!