How To Add Custom Search Option in Report & Interactive Grid

 

Create Search Option

Flowing the steps -->

1. At first create "SEARCH" item in the EMPLOYEES_LIST report.

   And you can select icon "fa-search"


2. execute when page loads

-- create DAYNAMIC ACTION and select Action "Execute JavaScript"

$('#P11_SEARCH').keyup

(

function (evt)

    {

    $('#sid').trigger('apexrefresh');

    }

);


3. employees_list (classic report edit)

     * ststic id --> sid

     * sql query -->

WHERE UPPER(LTRIM(RTRIM(FULL_NAME))) LIKE '%' || UPPER(LTRIM(RTRIM(:P11_SEARCH))) || '%'

or

   WHERE UPPER(LTRIM(RTRIM(FULL_NAME)))||

   LTRIM(RTRIM(PHONE))LIKE '%' || UPPER(LTRIM(RTRIM(:P11_SEARCH))) || '%'


     *** page item to submit -- P11_SEARCH

Maltipule Item add :

And 
UPPER(LTRIM(RTRIM(get_party_name_add('N',SETUP_PARTY_COM_ID))))  || 
UPPER(LTRIM(RTRIM(get_party_name_add('N',BUYER_ID))))                     || 
UPPER(LTRIM(RTRIM(get_work_flow('INV',ID))))                                       ||
UPPER(LTRIM(RTRIM(get_air_hawb_no(ID))))                                           ||
UPPER(LTRIM(RTRIM(AIR_BOOKING_ID_WISE_MAWB('MAWB',ID))))          ||
UPPER(LTRIM(RTRIM(get_airport_DTL ('A',AIRPORT_DESTI))))LIKE '%'       || 
UPPER(LTRIM(RTRIM(:P17_SEARCH)))                                                   || '%'

-----------------------------------------------------------

Date To Date Search :

 

 And  TO_DATE(TO_CHAR(BOOKING_DATE,'DD-MON-RRRR'),'DD-MON-RRRR')    BETWEEN NVL(:P17_FDATE, BOOKING_DATE) AND NVL(:P17_TDATE, BOOKING_DATE)

------------------------

And   D.BOOKING_DATE
        BETWEEN NVL(:P483_START_DATE, D.BOOKING_DATE) AND NVL(:P483_END_DATE, D.BOOKING_DATE)


===============================================

Search by Popup LOV



Step 1 :
======

Create three Items as Like (
P319_BOOKING_ID , P319_SHIPPER , P319_BUYER)

Select popup LOV & SQL Query Set.

Step 2 :
======

Create Region As Like (Classic/Interactive Report & Interactive Grid)

SQL Query :

SELECT
A.ID P_ID,
get_party_name_add('N',A.SETUP_PARTY_COM_ID) SHIPPER,
get_party_name_add('N',A.BUYER_ID) Buyer,
A.booking_id,
.
.
.
FROM SEAEXPORT_MST A, SEAEXPORT_GOODS_INFO B 
WHERE A.ID=B.SEAEXPORT_MST_ID
and A.BUYER_ID=nvl(:P319_BUYER,a.buyer_id) 
and A.SETUP_PARTY_COM_ID=nvl(:P319_SHIPPER,a.SETUP_PARTY_COM_ID) 
and A.booking_id=nvl(:P319_BOOKING_ID,a.booking_id);

Step 3 :
======

Page Items to Submit : P319_BOOKING_ID , P319_SHIPPER , P319_BUYER

Step 4 :
======

LOV select then Region Refresh.

Select P319_BOOKING_ID and Set Dynamic Action.

Action Name : Refresh_Region
Event : Change
Item : 
P319_BOOKING_ID 

True --> Action : Refresh
Selection Type : Region
Region : (Select your Your region)

Post a Comment

Previous Post Next Post