Databases Reference
In-Depth Information
IR_FILTER
IR FILTER allows you to programmatically create a filter on an interactive report. This can be handy
when your filter value could contain a colon (mitigating the need to escape it) and also when you need to
set so many filters that the URL gets unwieldy. The syntax is
APEX UTIL.IR FILTER (
p page id IN NUMBER,
p report column IN VARCHAR2,
p operator abbr IN VARCHAR2 DEFAULT NULL,
p filter value IN VARCHAR2,
p report alias IN VARCHAR2 DEFAULT NULL );
To create multiple filters, you just call IR FILTER repeatedly. The region in Figure 13-33 contains
three items that a user can specify to preset filters.
Figure 13-33. Items to pass via IR_FILTER
To pass these values to a report on page 7, I will first reset the report that I want displayed; its alias is
PRIMARY . I will then clear any filters or other customizations that might have been put in place by the user
when they last visited the report. Finally, I will conditionally set several filters.
begin
apex util.ir reset (
p page id => 7,
p report alias => 'PRIMARY');
apex util.ir clear (
p page id => 7,
p report alias => 'PRIMARY' );
if :P12 CATEGORY ID is not null then
apex util.ir filter (
p page id => 7,
p report column => 'CATEGORY ID',
p operator abbr => 'EQ',
p filter value => :P12 CATEGORY ID,
p report alias => 'PRIMARY' );
end if;
if :P12 NAME CONTAINS is not null then
apex util.ir filter (
p page id => 7,
p report column => 'PRODUCT NAME',
p operator abbr => 'C',
Search WWH ::




Custom Search