18.1 不展现直接导出
在web页面上不展现出报表,直接导出
1.通过提交请求给地址导出excel
http://serverurl/report/Report-ExcelAction.do?reportId=xxxx&newReport=true&otherParam=yy
2.通过提交请求给地址导出pdf
http://serverurl/report/Report-PdfAction.do?reportId=xxxx&newReport=true&otherParam=yy
3.通过提交请求给地址导出word
http://serverurl/report/Report-WordAction.do?reportId=xxxx&newReport=true&otherParam=yy
4.通过提交请求给地址导出ppt
http://serverurl/report/Report-PptAction.do?reportId=xxxx&newReport=true&otherParam=yy
5.通过提交请求给地址导出rtf
http://serverurl/report/Report-RtfAction.do?reportId=xxxx&newReport=true&otherParam=yy
- reportId是报表id,调用相应的报表,
- otherparam是报表中的参数名称,
- newReport=true代表重新生成报表而不从缓存中读取,这个参数是必须有的。
6.直接打印
函数说明:
打印报表的js函数
函数语法:
reportPrint(param,type)
参数说明:
名称 | 数据类型 | 说明 | 是否必需 |
---|---|---|---|
param | 对象 | 报表参数的集合 | 是 |
type | 字符串 | 取值为:”applet”,”lodop” | 否 |
示例:
var param={};
param.reportId="089ac167-785c-4b39-a864-ec710b5a94";//报表id
param.newReport="true";
param.name=unieap.byId("s_name").getValue();//报表参数 name
//打印相关参数
param.isResultant="false";
param.silent="no";
param.setPageSetup="false";
reportPrint(param,”lodop”);
打印参数说明:
- reportId:需要打印的报表ID。
- isResultant: 标识是否是报表结果的打印
- setPageSetup: 标识是否出现applet打印设置界面
- silent (yes 或 no) : 标识是否为一键打印,如不写则为no