By default, the view printer prints the same headers and footers of all pages that you print;
only the page number changes. If you want different headers or footers on different pages, you
can provide a customized callback for header and footer text. The callback must implement the
CustomHeaderAndFooterCallback
interface, which is defined in the
oracle.dss.dataView
package. You register the callback by calling the
setCustomHeaderAndFooterCallback
method of the view printer.
The CustomHeaderAndFooterCallback
interface has one method in it,
getDynamicContent
. The view printer calls getDynamicContent
for each
header or footer that uses a custom callback, for each page. The view printer passes the
constant that identifies the header or footer, the current content of the header or footer,
the physical page number, and an array that identifies the logical page. Your implementation of
getDynamicContent
should return the content that you want in that header or footer.
You specify which headers and footers use the custom callback by calling the
setHeadersAndFootersUsingCallback
method of the view printer. The
following table shows the constants that this method takes, with a description
of each. Use the or operator (|) to combine constants.
Constants for |
Description |
---|---|
|
Left header |
|
Center header |
|
Right header |
|
Left footer |
|
Center footer |
|
Right footer |
|
All headers and footers |
|
No headers and footers use a callback |