Hi,
I have a requirement that get all the public saved report sql from one interactive report.
Suppose that:
app_id:1
page_id:2
interactive_region_id:3
now I saved 2 public reports, and their in formations as below: (select * from apex_application_page_ir_rpt where application_id =1 AND page_id = 2 and REPORT_TYPE='PUBLIC')
REPORT_ID REPORT_NAME REPORT_TYPE
41 a PUBLIC
42 b PUBLIC
I used the below code, but I get two same print result, how can I achieve my goal? Help!!!
DECLARE
l_report apex_ir.t_report;
l_query varchar2(32767);
begin
l_report := APEX_IR.GET_REPORT (
p_page_id => 2,
p_region_id => 3,
p_report_id => 41);
l_query := l_report.sql_query;
htp.p(l_query);
l_report := APEX_IR.GET_REPORT (
p_page_id => 2,
p_region_id => 3,
p_report_id => 42);
l_query := l_report.sql_query;
htp.p(l_query);
end;