1 Reply Latest reply on Jan 22, 2014 1:04 PM by TexasApexDeveloper

    IR Reports getting the Active Query Issue


      Using the following code to extract the query of users active interactive report:


        SELECT region_id

          INTO v_region_id

          FROM apex_application_page_regions

        WHERE application_id = p_app_id AND

              page_id = p_page_id AND

              source_type = 'Interactive Report';


        v_report_id := apex_ir.get_last_viewed_report_id (p_page_id => p_page_id,

                       p_region_id => v_region_id);


        v_report := apex_ir.get_report (p_page_id => p_page_id,p_region_id => v_region_id,

                    p_report_id => v_report_id);


        v_query := v_report.sql_query;


      How is it, that Oracle APEX internally can produce a CSV file from the same query WITHOUT the additional columns is my question.. Is there another function that can be used to extract just the query WITHOUT the aggregate columns?


      Using Oracle 11gR2

      APEX 4.2.3


      The issue is with interactive reports that have aggregate summations, these items are appearing as columns at the end the select


      Demo App:


      On Oracle Hosted site

      Workspace: homeworld

      login: demo

      password: demo

      Application: Application # 22422, Interactive Report Columns


      Thank you,


      Tony Miller

      LuvMuffin Software

      Ruckersville, Va