1.老版本分为flash打印、PDF打印、applet打印
2.10.0版本对 前者做了汇总分为零客户端打印(轻量级、便捷打印、不支持首选打印)、本地软件打印(固定场景打印、大批量打印单据、支持首选打印)
JS调用FR打印方法
JS 调用 FR 打印方法-https://help.finereport.com/doc-view-1071.html
例:新接口JS写法(自定义按钮)
var printurl="http://localhost:8075/webroot/decision/view/report";// 前者为了10版本
//老版本var printurl="http://localhost:8075/webroot/decision/view/report"
var reportlets ="[{reportlet: 'GettingStarted.cpt', 地区: '华北'}, {reportlet: 'GettingStarted.cpt', 地区: '华东'}]";//带参数
var config = {
printUrl : printurl,
isPopUp : true,
// 是否弹出设置窗口,true为弹出,false为不弹出
data :{
reportlets: reportlets // 需要打印的模板列表
},
printType : 1, // 打印类型,0为零客户端打印,1为本地打印
// 以下为零客户端打印的参数,仅当 printType 为 0 时生效
ieQuietPrint : false,// IE静默打印设置 true为静默,false为不静默
// 以下为本地打印的参数,仅当 printType 为 1 时生效
printerName : 'Microsoft Print to PDF', // 打印机名
pageType: 2, // 打印页码类型:0:所有页,1:当前页,2:指定页
pageIndex: '1-3', // 页码范围。当 pageType 为 2 时有效
copy: 3, // 打印份数
};
FR.doURLPrint(config);
例2:
WEB页面调或模板调用:https://help.finereport.com/doc-view-1088.htm
例3:
批量打印:https://help.finereport.com/doc-view-1095.html
动态打印:https://help.finereport.com/doc-view-1097.html
配置:服务 器配置--打印设置(本地软件打印需要设置端口和下载客户端); 板模打印设置为模版单独设置(零客户端或本地软件打印)