5

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?

Frank Schmitt
  • 30,195
  • 12
  • 73
  • 107
  • 1
    A good question. I don't have an answer. It might be because of changes in architecture from apex 4 to 5 (more than 1 IR per page possible, javascript rework). You may be best served on OTN... The devs may get the chance of seeing this and giving an authorative answer, whereas I can only offer a guess, which is: doesn't work anymore. The alternative? Probably only through messing around with javascript and triggering a "change' event (can help with that) – Tom Jul 25 '16 at 09:13
  • @Tom I'll cross-post to OTN, then. Anyway, I'm open to suggestions - if you can come up with a messy Javascript alternative, that's fine with me. – Frank Schmitt Jul 25 '16 at 09:19
  • It's unfortunate about the cross-posting, but the community for apex on SO is just so small, especially for problems like these. It's hard to confirm for sure, even though I can confirm all you've seen happening. I'm quite sure it's because of the changes in linking to IRs. It all hinges on aliases, so the private ones have likely fallen off the wayside. https://docs.oracle.com/cd/E59726_01/doc.50/e39147/bldapp_rpt003.htm#BABIAFHG – Tom Jul 25 '16 at 09:23
  • I'm pretty sure I saw something in the Oracle Docs release notes for Apex 5 saying no linking to private reports. – Mark Stewart May 11 '17 at 14:05

0 Answers0