87,907
社区成员
发帖
与我相关
我的任务
分享
Ext.define('Test.View.Report', {
extend: 'Ext.window.Window',
title: '报表',
layout: 'fit',
autoShow: true,
modal: true,
formBind: true,
initComponent: function () {
this.items = [
{
xtype: 'box',
autoEl: {
tag: 'div',
html:'<script type=\"text/javascript\">CreateDisplayViewer(\'../../grf/test1.grf\');</script>'
}
}
];
this.callParent(arguments);
}
});
//创建报表查询显示插件,详细请查看帮助中的 IGRDisplayViewer
//ReportURL - 获取报表模板的URL
//DataURL - 获取报表数据的URL
function CreateDisplayViewer(ReportURL)
{
document.write('<OBJECT classid="CLSID:E060AFE6-5EFF-4830-B7F0-093ECC08EF37" '+ GridReportCodeBase + ' width="100%" height="100%" id="ReportViewer" VIEWASTEXT>');
document.write('<param name="ReportURL" value="' + ReportURL + '">');
document.write('<param name="DataURL" value="' + DataURL + '">');
document.write('<param name="SerialNo" value="' + SerialNo + '">');
document.write('<param name="UserName" value="' + UserName + '">');
document.write('</OBJECT>');
}