3 Replies Latest reply: May 8, 2013 2:24 AM by Denes Kubicek RSS

    How to select records from Interactive Reports based on checkboxes

    844372
      Referring to the link below
      http://apex.oracle.com/pls/otn/f?p=31517:95

      I want to select rows from the Interactve Report based on a checkbox. This demo page has 2 sections, one for classic report and other for interactive one. The classic report is able to select the whole records but the interactive report selects only the emp nos. I am looking for a functionality where I can select the whole record from the interactive report.
      Any pointers will be helpful.

      Thanks
        • 1. Re: How to select records from Interactive Reports based on checkboxes
          Denes Kubicek
          That is easy. You should just modify the query:
          DECLARE
             v_count   INTEGER := 0;
          BEGIN
             :p95_text_ir := NULL;
          
             FOR i IN 1 .. apex_application.g_f20.COUNT
             LOOP
                v_count := v_count + 1;
          
                FOR c IN (SELECT ename, job, mgr, sal, deptno
                            FROM emp
                           WHERE empno = apex_application.g_f20 (i))
                LOOP
                   :p95_text_ir :=
                         :p95_text_ir
                      || 'ID: '
                      || c.empno
                      || ' / '
                      || 'Name: '
                      || c.ename
                      || ' / '
                      || 'Job: '
                      || c.job
                      || ' / '
                      || 'Manager: '
                      || c.mgr
                      || ' / '
                      || 'Salary: '
                      || c.sal
                      || ' / '
                      || 'Department: '
                      || c.deptno
                      || CHR (10);
                END LOOP;
             END LOOP;
          
             :p95_text_ir := :p95_text_ir || ' / Records selected: ' || v_count;
          END;
          Denes Kubicek
          -------------------------------------------------------------------
          http://deneskubicek.blogspot.com/
          http://www.apress.com/9781430235125
          http://apex.oracle.com/pls/apex/f?p=31517:1
          http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
          -------------------------------------------------------------------
          • 2. Re: How to select records from Interactive Reports based on checkboxes
            844372
            Thanks for the quick response.
            But I want to retrieve only displayed columns. For eg. If user selects only ename, job, mgr to be displayed..then the report should fetch just those columns (somewhat dynamic, based on user selection).
            Waiting for the reply.

            Thanks
            • 3. Re: How to select records from Interactive Reports based on checkboxes
              Denes Kubicek
              You can read the IR report definition from APEX_IR_-views.

              Denes Kubicek
              -------------------------------------------------------------------
              http://deneskubicek.blogspot.com/
              http://www.apress.com/9781430235125
              http://apex.oracle.com/pls/apex/f?p=31517:1
              http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
              -------------------------------------------------------------------