TECH TIP: Printing a Disclaimer on the Back of Every Page.
Question: “I want to use duplexing to print some legalese on the back of every page of my report. How do I do this?”
Answer: This is fairly easy to do – basically, every odd numbered page will contain data, while every even
numbered page will contain legalese.
- In your report, create a new group and set it to ReprintOnSubsequentPage. (This is the default setting).
- Set the size of the new Group Header to fill the entire physical page (if the page is 8.5″ x 11″ portrait
with .25″ margins, set the height of the band to 10.5″). - Place your disclaimer in this Group Header as you want it to appear on the back of the pages.Note: The Group Header will take up the entire page so that no data will print on this page.
- In the TppReport’s StartPage event, enter the following code:
if Odd(ppReport1.AbsolutePageNo) then ppGroupHeaderBand1.Visible := False else ppGroupHeaderBand1.Visible := True;
Note: This will cause the Group Header to print only on even numbered pages.
This will work for every thing but the last page. Since the last page of data will always be an odd numbered
page, we need to make sure the disclaimer gets printed on the back of the last page. - Turn on the Summary band for the report and set its NewPage property to true.
- Add the same controls from the Group Header to the Summary band in the very same positions. This band will print only once on the back of the last page.
Advanced Note: The method described above will work for most cases. If however, adding a group disrupts the generation of an already complex report it may be necessary to use a more advanced approach. This involves generating all report page objects to memory, then manually adding the legalese page where it is needed before sending all pages to the printer device. See the following example on how this should be done.