In one of our APEX 5 applications, we're using a drop-down box that allows users to choose a target interactive report in the same application. The application then branches to the target page, and the report is displayed.
In APEX 4, this works fine with both public and private reports; we use this query to obtain the list of available reports:
select distinct (sr.report_id || '(' || nvl(sr.report_name,
'Primary') || ')') as display_value,
sr.report_id as return_value
from apex_application_page_ir_rpt sr
where sr.application_id = v('APP_ID')
and ((sr.report_type = 'PRIVATE' and sr.created_by = upper(v('APP_USER'))) or
(sr.report_type = 'PRIMARY_DEFAULT'))
and sr.page_id <> v('APP_PAGE_ID')
order by 1
When the user chooses a value from the drop-down, it is stored in P35_REPORT_LIST
. We then use this value to construct the target URL for our branch:
Declare
url_s varchar2(1000) := 'f?p=175:';
called_page number;
begin
select sr.page_id
into called_page
from apex_040200.apex_application_page_ir_rpt sr
where sr.report_id = :P35_REPORT_LIST;
url_s := URL_s || called_page || ':' || v('APP_SESSION') || ':IR_REPORT_' || :P35_REPORT_LIST ||
':NO::::P1_FILTER_BY_DEFAULT_SEARCH:1';
return url_s;
end;
However, in APEX 5 this no longer works; we get an APEXIR_REPORT_DOES_NOT_EXIST error.
The APEX 5 documentation says:
9.4.17 Linking to Shared Interactive Reports
You can link to saved primary default, alternative default and public reports using IR_REPORT_[report_alias] in the request value of the URL.
which seems to imply that you can no longer link to private reports. Also, when you run the query
select page_id, interactive_report_id, report_link_example
from apex_application_page_ir_rpt sr
the REPORT_LINK_EXAMPLE
column is empty for private reports which also seems to imply that linking to them no longer works.
Are there any alternatives for linking to private reports in APEX 5?