Report.PrintHeader
Returns/sets the document header used when printing.
| Syntax | Parameters | Return/assignment value |
|---|---|---|
Property Report.PrintHeader( _
placement As PrintHeaderPlacement) As String
|
placement [in]
Which area of the paper the header should appear on. Type: PrintHeaderPlacement |
String |
Remarks: The following keywords can be used in a printer header/footer string:
&[Page]: The current page number.
&[Pages]: The total number of pages.
&[Document Name]: The document name.
&[Date]: The date when the report was printed.
&[Time]: The time when the report was printed.
SVB Example
Adding print headers and footers:
Option Explicit
Option Base 1
Sub Main
'This will add a centered printer header saying
'"CONFIDENTIAL: For Dayton office use only" into the report.
'When you print the report, this header will appear on every page.
ActiveReport.PrintHeader(scPrintFooterCenter) = _
"CONFIDENTIAL: For Dayton office use only"
'This will add a printer footer with the date, current page,
'and total pages on every page.
'An interesting note here is that you can use the same
'header/footer syntax here that you can interactively.
'For example, the syntax "&[Page]" will display the current page number in the footer.
ActiveReport.PrintFooter(scPrintFooterLeft) = _
"&[Date]"
ActiveReport.PrintFooter(scPrintFooterCenter) = _
"Page &[Page] of &[Pages]"
End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.
