SRW.SET_BEFORE_PAGE_HTML
built-in procedureThis procedure inserts any text, graphics, or HTML commands that you want to appear at the beginning of pages (In this case, a page refers to a report page) of your document. This attribute is useful for placing a logo or some standard links at the beginning of each page in an HTML document.
If you use HTML page streaming, this procedure applies to all pages of your
report output (for example, background color or images, or any other <body>
HTML attributes). To specify HTML for only the first (header) or last (footer)
pages of your report, use the SRW.SET_BEFORE_REPORT_HTML
or SRW.SET_AFTER_REPORT_HTML
PL/SQL procedures, respectively.
SRW.SET_BEFORE_PAGE_HTML(type,'string');
Parameter |
Description |
|
Is |
|
Is a filename or the text to be inserted, depending on what you specified for the type parameter. |
You can also define this attribute using the Reports Builder user interface:
Property Inspector |
Set the Before Page Type and Before Page Value properties. |
If you want the SRW.SET_BEFORE_PAGE_HTML
to apply to every page of the report, you should specify it in a trigger
that fires before the report begins formatting, such as the Before
Report trigger .
If you want the SRW.SET_BEFORE_PAGE_HTML
to apply only to the current page, you should specify it in a format
trigger for an object on that page.
The example below centers the document in the browser.
function BeforeReport return boolean is
begin
if ((upper(:MODE) != 'CHARACTER') and
(upper(:DESFORMAT) = 'HTML')) then
SRW.SET_BEFORE_PAGE_HTML(SRW.TEXT_ESCAPE,'<CENTER>');
SRW.SET_AFTER_PAGE_HTML(SRW.TEXT_ESCAPE,'</CENTER>');
end if;
return (TRUE);
end;
About the
Reports Builder built-in package (SRW
)
Copyright © 1984, 2005, Oracle. All rights reserved.