Here is how trigger APEX classic report refresh when user stop entering to text field.

First create classic report to your page.

In this example I have used following query joining EMP and DEPT tables:

SELECT e1.empno
    ,e1.ename
    ,e1.job
    ,e2.ename AS mgr
    ,e1.hiredate
    ,e1.sal
    ,e1.comm
    ,d.dname
    ,d.loc
FROM emp e1
LEFT JOIN emp e2
    ON e1.mgr = e2.empno
JOIN dept d ON e1.deptno = d.deptno

 

When you create report set "Enable Search" to "Yes" on wizard "Report Attributes" page and select columns for search.

List of values definition

 

Go edit report attributes and add to "Page Items to Submit" text item created by report wizard.

List of values definition

 

Edit page attributes and add page JavaScripts Function and Global Variable Declaration:

var gTimer;

and to Execute when Page Loads:

$("#Px_REPORT_SEARCH").keypress(function(e){
 return e.keyCode!==13;
});

Replace Px_REPORT_SEARCH with text item name created by report wizard.

List of values definition

Create dynamic action:

  • Name: Report instant search
  • Event: Key Release
  • Selection Type: Item(s)
  • Item(s): {select text item created by report wizard}
  • Condition: JavaScript expression
  • Value:
    this.browserEvent.keyCode!==13
  • Action: Execute JavaScript code
  • Fire On Page Load: False
  • Code:
    var lTrg=$(this.affectedElements);
    clearTimeout(gTimer);
    gTimer=setTimeout(function(){
     clearTimeout(gTimer);
     lTrg.trigger("apexrefresh");
    },900);
  • False Action: Execute JavaScript code
  • Fire On Page Load: False
  • Code:
    clearTimeout(gTimer);
    $(this.affectedElements).trigger("apexrefresh");
  • Selection Type: Region
  • Region: {select your report region}

 

Now run page and type to search text field. After small delay report is refreshed and shows your search result.

See working example.

 

Sample is also available for download.