ADD_FILTER Procedure Signature 1

This procedure creates a filter on an interactive report using a report ID.

Note:

The use of this procedure in a page rendering process causes report download issues (CSV, HTML, Email, and so on). When a user downloads the report, the interactive report reloads the page with download format in the REQUEST value. Any interactive report settings changes (such as add filter or reset report) are done in partial page refresh. Thus, the download data may not match the report data user is seeing. For this reason, Oracle recommends only using this procedure in a page submit process.

Syntax

APEX_IR.ADD_FILTER(
    p_page_id       IN NUMBER,
    p_region_id     IN NUMBER,
    p_report_column IN VARCHAR2,
    p_filter_value  IN VARCHAR2, 
    p_operator_abbr IN VARCHAR2 DEFAULT NULL, 
    p_report_id     IN NUMBER DEFAULT NULL);

Parameters

Table 17-1 ADD_FILTER Procedure Signature 1 Parameters

Parameter Description

p_page_id

Page of the current Application Express application that contains an interactive report.

p_region_id

The interactive report region (ID).

p_report_column

Name of the report SQL column, or column alias, to be filtered.

p_filter_value

The filter value. This value is not used for N and NN.

p_operator_abbr

Filter type. Valid values are as follows:

EQ = Equals

NEQ = Not Equals

LT = Less than

LTE = Less then or equal to

GT = Greater Than

GTE = Greater than or equal to

LIKE = SQL Like operator

NLIKE = Not Like

N = Null

NN = Not Null

C = Contains

NC = Not Contains

IN = SQL In Operator

NIN = SQL Not In Operator

p_report_id

The saved report ID within the current application page. If p_report_id is null, it adds the filter to the last viewed report settings.

Example

The following example shows how to use the ADD_FILTER procedure to filter the interactive report with report ID of 880629800374638220 in page 1, region 2505704029884282 of the current application with DEPTNO equals 30.

BEGIN
    APEX_IR.ADD_FILTER(
        p_page_id       => 1,
        p_region_id     => 2505704029884282,
        p_report_column => 'DEPTNO',
        p_filter_value  => '30', 
        p_operator_abbr => 'EQ', 
        p_report_id     => 880629800374638220);
END;