Introduction
First create interactive report. In this example rows where manager name equals APP_USER value are highlighted.
I have used following query joining EMP and DEPT tables for interactive report:
Sample Query :
SELECT e1.empno ,e1.ename ,e1.job ,e2.ename AS mgr -- Dynamic action use this column alias ,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
Create dynamic action:
- Name: High Light User
- Event: After Refresh
- Selection Type: Region
- Region: {select your report region}
- Condition: No Condition
- Action: Execute JavaScript code
- Fire On Page Load: True
Sample Code:
For Older Versions:
this.affectedElements.find('table.apexir_WORKSHEET_DATA td[headers="MGR"]').each(function(i){ var lThis=$(this); if(lThis.text()=="&APP_USER."){ lThis.parent().children().css({"background-color":"#55A955"}); } }); For Newer Versions:
this.affectedElements.find('td[headers="MGR"]').each(function(i){ var lThis=$(this); if(lThis.text()=="&APP_USER."){ lThis.parent().children().css({"background-color":"#55A955"}); } });
- Selection Type: Region
- Region: {select your report region}
Note! You need modify dynamic action JavaScript part td[headers=”MGR”] according your report column alias.
Recent Posts