SRW.SET_FORMAT_ORDER
built-in procedureThis procedure specifies the order in which the three sections of a report (Header, Main, and Trailer) are formatted.
SRW.SET_FORMAT_ORDER (first_section, second_section, third_section);
Parameter |
Description |
first_section
|
Is |
You can also define the first_section, second_section,
third_section
parameters using the Reports Builder user interface:
Property Inspector |
Set the Format Order of Sections property. |
SRW.SET_FORMAT_ORDER
may
be called in either a Before
Parameter Form trigger or an After
Parameter Form trigger. If called in both triggers, the call from the
After Parameter Form trigger takes precedence.
If this procedure is defined, it overrides the Format Order of Sections property setting.
In certain circumstances involving the Paper Design view, Reports Builder
does not execute the Before Parameter Form or After Parameter Form triggers;
therefore, SRW.SET_FORMAT_ORDER
is not executed. This occurs in the following cases:
If you switch view from the Paper Design view to, say, the Paper Layout view and then back to the Paper Design view.
If in the Paper Design view, you choose PrintPrint
Preview, then close the Print Preview window.
If you perform a live refresh on the Paper Design view.
In such cases, the value of the Format Order of Sections property is used during report formatting.
To overcome this limitation, you can close the Paper Design view, then
redisplay it. Or, you can ensure that the Format Order of Sections property
is set to the same format order specified by SRW.SET_FORMAT_ORDER
.
Note: this limitation applies only in Reports Builder; it does not occur in Reports Runtime and Reports Server.
If SRW.SET_FORMAT_ORDER
is called from any trigger other than a Before Parameter Form trigger or
an After Parameter Form trigger Reports Builder issues an error message:
REP-1426: <trigger name>:
Running SRW.SET_FORMAT_ORDER from incorrect context.
function AfterPForm return boolean is
begin
SRW.SET_FORMAT_ORDER(SRW.MAIN_SECTION
, SRW.HEADER_SECTION
, SRW.TRAILER_SECTION
);
return (TRUE);
end;
This example produces the same result as the example above.
SRW.HEADER_SECTION = 0
SRW.MAIN_SECTION = 1
SRW.TRAILER_SECTION = 2
function AfterPForm return boolean is
begin
SRW.SET_FORMAT_ORDER(1, 0, 2);
return (TRUE);
end;
Note: The possible range of values that SRW_SET_FORMAT_ORDER
takes are: 0, 1 and 2. If you specify values outside this range, Reports Builder
issues an error message:
REP-1417: <trigger name>: Invalid
integer argument passed to SRW.SWT_FORMAT_ORDER.
About the
Reports Builder built-in package (SRW
)
About report sectioning and sections
"Building a Paper Report with a Simple Table of Contents and Index" and "Building a Paper Report with a Multilevel Table of Contents" chapters in the Oracle Reports Building Reports manual.
Copyright © 1984, 2005, Oracle. All rights reserved.