我们目前正在Radwindow中加载Telerik报告。我们正在尝试在报告中运行javascript功能,但在报告加载后似乎找不到挂钩脚本的方法:
$("#TelerikReportviewer").on("click", function () {
ResetSessionTimer();
});
是否有办法在报表中加载Javascript时加载Javascript?
答案 0 :(得分:0)
<script type="text/javascript">
$('document').ready(function () {
$("#reportViewer1")
.telerik_ReportViewer({
serviceUrl: 'api/Reports',
templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate-9.1.15.731.html',
reportSource: {
report: "Payroll.ReportLibrary.HDMF.HDMF,Payroll.ReportLibrary",
parameters: {
payoutUID: '588206E1-BE66-4C6C-8433-0D51F7530ECF',
employeeTypeUID: '4DA38CC9-8C80-47A7-B020-FC296C029682,4DA38CC9-8C80-47A7-B020-FC296C029681',
group: 'Group By Department'
}
},
viewMode: 'PRINT_PREVIEW',
scaleMode: '4.0',
//scaleMode: 'FIT_PAGE',
pageReady: function (e) { console.log("this event handler was attached in the constructor", e); },
renderingEnd: function (e, args) { console.log("This event handler will be called before rendering the report.", e, args); }
});
});
</script>