OMR Lines: Adding Condition to print on First/Last Page

natalieroberge

Active Member
Hello
I would like your input on how to add a condition to print a field if the page is the first page or the last page. This will be used in my Header Template at the top for the invoice R5542565 to print OMR lines. I have done some research that indicates the <?start@last-page-first:body?><?end body?> tags need to be used, but I keep getting error messages when I add them to my rtf. Would anyone be able to give me some input on how to add this logic successfully? Thanks!
Natalie
 
Natalie,

We accomplished different OMR first/last page lines in Word by turning on page numbering, then clicked "different first page header/footer". Then I put a table in the first page header section and underlined the appropriate cells to act as the first page OMR. Then copied that same table to the continuation header and simply underlined different cells to act as continuation OMR.

Low tech solution, but its simple and it worked.

Chris
 
Hi Chris! Thanks so much. I did as you suggested and built some new header templates. Its working
smile.gif
You have been so helpful
smile.gif
Thanks!!!
 
Hi Chris
I was wondering how many unique headers did you create? I need 3 one for first page, one for last page, and one for the pages inbetween. I was able to successfully get it working for first and middle pages, but I can not get the last page to work. I keep getting an extra page printing when I use the "add section break" to allow for a new header. I dont know if its just the placement of my section break or if there is something else I should do. Any ideas?
 
[ QUOTE ]
Hi Chris
I was wondering how many unique headers did you create? I need 3 one for first page, one for last page, and one for the pages inbetween. I was able to successfully get it working for first and middle pages, but I can not get the last page to work. I keep getting an extra page printing when I use the "add section break" to allow for a new header. I dont know if its just the placement of my section break or if there is something else I should do. Any ideas?

[/ QUOTE ]

Coincidentally I'm having the same issue. Right now I can just get the first page to display different markings. I don't see any native Word functionality to make the document know when you're on a last page of a section, to allow for a different header (or different OMR for that matter).
 
try inserting the <?start@last-page-first:body?><?end body?> tags in your RTF template after you insert a Section Break (with page break)
 
The problem that I find when using the <?start@last-page-first:body?><?end body?> tag, is I still want to continue my detail section of the invoice on the last page. Im not creating a separate section, I just want the header on the last page to be different.
 
Then just use "last-page" instead of "last-page-first".

Just remember the following points.

The section for the last page must be defined as a Section Break - Next Page.

This section must not have any header or footer margins defined - set both to zero in Page Layout/Page Setup/Layout. Why do this? Because the body of the last page section must be laid out like this:

<?call:LastSectionHeader?>
<?start@last-page:body?>
<?end body?>
<?call:LastSectionFooter?>

Also make sure that the section does not have headers and footers defined and that it doesn't inherit the headers and footers from the previous section.

Note that the header (and footer - if you want a separate footer) template calls are positioned as part of the body. So having Word set aside the space just makes for extra spaces on the top and bottom of the last page.

If you set it up this way, then your detail section will continue to the last page - between the body tags. The header and footer will be what you defined.

If you only have a 2 page document - 1st page, then detail section on the 2nd page - the of the 2nd page will be the header and footer will be from the last page section you defined above. So any OMR tags you defined for the middle section WILL NOT show up. The only OMR tags that will show up will be from the 1st page header, and last page header.
 
Back
Top