在这篇文章中,我们将看到如何在单击同一行中的图标/链接时从Classic报告中获取行的数据。下面的示例,单击“点赞”图标后,获取任意列的数值,此示例是获取员工号与员工名称,弹出窗口及写到项中:
第一步,建立一个经典报表:

select EMPNO,
ENAME,
JOB,
MGR,
HIREDATE,
SAL,
COMM,
DEPTNO,
'aa' as likes
from EMP
where job is not null and rownum<=5
第二步,对like列进行设置,显示点赞图标:

<span id="likes"
onclick="apex.event.trigger(document,'getItemsFromReport',[{EMPNO:'#EMPNO#',ENAME:'#ENAME#'}]);void(0);"
class="fa fa-thumbs-o-up">
</span>
- “document”, this is the object the event is attached to
- “getItemsFromReport” , this we will give it while defining Dynamic action
- [{}] pair of name and values, which is being sent to the dynamic action
其中#EMPNO#代表要取得的列的列名
第三步,新建定制事件:

第四步,新建事件的真操作:

第五步:查看效果:

© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
喜欢就支持一下吧