7 Replies Latest reply: Aug 5, 2014 1:58 AM by KTM RSS

    How to populate one of the table field value in interactive report dynamically?

    KTM

      Hi All,

      In my Oracle Apex application, i have a table and am showing this table values as a interactive report.

      all the field values are coming from table but one field named "Quantity"  value should be user entered/selected value. so I am storing the value entered by user in apex collections

      "ITEMS_SELECTED_COLLECTION"

      The region source for this interactive report is as follows

       

      SELECT item item

            ,APEX_ITEM.DISPLAY_AND_SAVE (2, ITEM_DESCRIPTION) DESCRIPTION

            ,lot_number

            ,serial_number

            ,item_status

            ,product_category

            ,LOT_EXPIRY_DATE

            ,uom

            ,APEX_ITEM.DISPLAY_AND_SAVE (4, AVAILABLE_TO_RESERVE_QTY)

                AVAILABLETOSHIP

            ,APEX_ITEM.text (p_idx          => 3

                            ,p_value        => QUANTITY

                            ,p_attributes   => 'class="txt_quantity" size="5"'

                            ,p_size         => 5)

                Quantity

        FROM (SELECT item

                    ,ITEM_DESCRIPTION

                    ,lot_number

                    ,serial_number

                    ,item_status

                    ,LOT_EXPIRY_DATE

                    ,uom

                    ,AVAILABLE_TO_RESERVE_QTY

                    ,product_category

                    ,NVL (

                        (SELECT c006

                           FROM apex_collections

                          WHERE     collection_name = 'ITEMS_SELECTED_COLLECTION'

                                AND c001 = civ.item

                                AND NVL (c003, '0') = NVL (civ.lot_number, '0')

                                AND NVL (c007, '0') = NVL (civ.serial_number, '0')

                                AND NVL (c008, '0') = NVL (civ.item_status, '0'))

                       ,0)

                        Quantity

                FROM XXMMO_CUSTOMER_INVENTORY_V civ

               WHERE cust_account_id = :P14_ACCOUNTID)

       

      As you can see, i am populating the Quantity field value from apex collection named "ITEMS_SELECTED_COLLECTION".

       

      But if i go with the above approach, my page loading time taking more time.

       

      And if i remove getting Quantity field value from apex collection

      NVL (

                        (SELECT c006

                           FROM apex_collections

                          WHERE     collection_name = 'ITEMS_SELECTED_COLLECTION'

                                AND c001 = civ.item

                                AND NVL (c003, '0') = NVL (civ.lot_number, '0')

                                AND NVL (c007, '0') = NVL (civ.serial_number, '0')

                                AND NVL (c008, '0') = NVL (civ.item_status, '0'))

                       ,0)

       

      Page loads faster.

      so i want set the quantity field value separately.

      so how can i achieve this ? is there any way i can set the quantity field value separately? is it possible to achieve this by using dynamic actions?

      could some one suggest me on this?

       

       

      Thanks in advance.