Tuesday, February 19, 2019

IG report Query

1. Create a Interactive Grid Editable Form below query.

select empno,ename,job,mgr,hiredate,sal,comm, deptno from scott.emp

2. Create Page item P52_EMPNO

3. Create classic report with parameter from Master table  & Advance Static id : ID 
 And Page Items to Submit : p52_empno

select empno,ename,job,mgr,hiredate,sal,comm,deptno
from scott.emp
where instr(:p52_empno, ':' ||empno|| ':' ) > 0 ;

Step 3. Create a Dynamic Action on Master region

Region : Master_Region 

# True action Execute JavaScript Action.

var i, selectedIds=":" ,
model = this.data.model;

for ( i = 0; i < this.data.selectedRecords.length; i++ ) {
if (i>=0) {
selectedIds += model.getValue( this.data.selectedRecords[i], "EMPNO") + ":"; } // Matching column (parameter)
else
{
selectedIds += model.getValue( this.data.selectedRecords[i], "EMPNO"); // Matching column (parameter)
}
}
$s("P52_EMPNO", selectedIds); //Item to keep parameter Value from master Table
apex.region("ID").refresh();

No comments:

Post a Comment

To generate a PDF using JavaScript in Oracle APEX from a collection

  To generate a PDF using JavaScript in Oracle APEX from a collection, you can follow these steps: 1. Create a button or link on your APEX p...