This is the code of the dynamic action after setting the department's name
declare
l_region_id number;
begin
-- We need to find the internal region ID of the report
select max(region_id)
into l_region_id
from APEX_APPLICATION_PAGE_REGIONS
where application_id = :APP_ID and
page_id = :APP_PAGE_ID and
static_id = 'employee';
-- We call a procedure to add a Filter to the report
APEX_IR.ADD_FILTER(
p_page_id => :APP_PAGE_ID,
p_region_id => l_region_id,
p_report_column => 'DNAME',
p_filter_value => :P4_DEPARTMENT,
p_operator_abbr => 'EQ',
p_report_id => null);
end;
Line 13: .This is the Function to add the filter to the report, we need the internal ID of the region. More info Here ->
APEX_IR