SRW.SET_BEFORE_REPORT_HTML
built-in procedureThis procedure inserts any text, graphics, or HTML commands that you want to appear at the beginning of your document. This attribute is useful for placing a logo or some standard links at the beginning of an HTML document.
If you use HTML page streaming, this procedure applies to the first page of
your report output. To specify HTML to apply to the entire report (for example,
background color or images, or any other <body>
HTML attributes),
you must use the SRW.SET_BEFORE_PAGE_HTML
PL/SQL procedure.
SRW.SET_BEFORE_REPORT_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 Report Type and Before Report Value properties. |
SRW.SET_BEFORE_REPORT_HTML
to replace this text, you
must ensure that it contains the equivalent HTML commands.
<html>
<body bgcolor="#ffffff">
SRW.SET_BEFORE_REPORT_HTML
should be set in a trigger that
fires before the report starts formatting, such as the Before
Report trigger.
The example below sets both the before and after report escapes in the Before Report trigger. The HTML for the before escape is located in a file named logo.htm. The HTML for the after report escape is specified within the PL/SQL itself.
function BeforeReport return boolean is
begin
if ((upper(:MODE) != 'CHARACTER') and
(upper(:DESFORMAT) = 'HTML')) then
SRW.SET_BEFORE_REPORT_HTML(SRW.FILE_ESCAPE,'logo.htm');
SRW.SET_AFTER_REPORT_HTML(SRW.TEXT_ESCAPE,'<ADDRESS>' ||
' Questions? - ' ||
'<A HREF=mailto:webmaster@xyztech.com>' ||
'webmaster@xyztech.com</A>' ||
'</ADDRESS>' ||
'</body></html>');
end if;
return (TRUE);
end;
About the
Reports Builder built-in package (SRW
)
Copyright © 1984, 2005, Oracle. All rights reserved.