A script-enabled browser is required for this page to function properly.

SRW.SET_BEFORE_PAGE_HTML built-in procedure

This 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.

Syntax


SRW.SET_BEFORE_PAGE_HTML(type,'string');

Parameter

Description

type

Is SRW.FILE_ESCAPE or SRW.TEXT_ESCAPE. It indicates whether the string parameter is a filename or the text to be inserted.

string

Is a filename or the text to be inserted, depending on what you specified for the type parameter.

GUI access

You can also define this attribute using the Reports Builder user interface:

Property Inspector

Set the Before Page Type and Before Page Value properties.

Restrictions

Example

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;

See also

About the Reports Builder built-in package (SRW)

SRW built-in package