2 Replies Latest reply on Jul 12, 2013 6:00 AM by 19SeGro93

    Report ID for different Applications



      I have a javascript code, which refreshes a report on a page.

      The problem is, that the report ID is hard coded. If I import this page to a different application, the report woun't be refreshed anymore.

      Following code is used:


      var v_get = new htmldb_Get(null, $v('pFlowId'),   'APPLICATION_PROCESS=AP_RECALC', 0);

      v_get.addParam('x01', Segment);

      v_Return = v_get.get();


      $a_report('734879922768742332', '1', '5000', '5000');



      Is there a possibility to change the '734879922768742332' to a variable, constant or static id (which does not cause a endless loop)


      Thanks for your help


      Remark: If you know the answer, you will get the points

        • 1. Re: Report ID for different Applications



          I had the same problem long back. I used hidden item to solve this issue. You can create a hidden item on the page as below


          Source Type: SQL Query (return single value)


          select to_char(region_id)

          from apex_application_page_regions

          where application_id = :APP_ID

          and page_id = :APP_PAGE_ID

          and upper(region_name) = upper('TEST REGION') //TEST REGION- Name of your region.

          change your javascript  as per your requirement for example,


          var reg_id=$v('P1_REGION_ID');



          It will work.





          • 2. Re: Report ID for different Applications

            You are right.

            Thank you


            I created the hidden item and changed the code from:

            $a_report('734879922768742332', '1', '5000', '5000');




            'P6_REPORT_ROUTE_ID'), '1', '5000', '5000');//734879922768742332


            That's it.

            1 person found this helpful