以下脚本均在Finereport 10 下运行,其他版本不一定适用,请注意自己使用的版本。
一、帆软决策报表移动弹窗移动弹窗需要传递当前界面的一些控件值时,如果是报表组件内的点击事件,偶尔存在获取不到外部组件的值,所以需要js进行获取。此方法也可以用于自定义传值,方便快捷。
//通过组件名称获取组件值 "widgetname" 为控件名var scode = _g().getWidgetByName("widgetname").getValue();//加载弹窗FR.mobilePopup({target: "template", //设置跟随弹窗parameters: {}, // post参数setting: {templatePath: "/demo/report_name.frm&scode=" + scode, //设置弹出模板的路径 拼接参数border: {type: 0,color: "rgb(0,0,0)", //边框颜色borderRadius: 5.0 //圆角},background: {color: "rgb(255,255,255)" // 背景色}, //移动端页面参数mobileRegular: {type: "custom" || "auto_height",heightPercent: 95.0, widthPercent: 95.0}, //平板端页面参数padRegular: {type: "custom" || "auto_height",heightPercent: 95.0,widthPercent: 95.0} //设置弹窗大小格式}}); 二、自定义跳转到网络报表虽然帆软本身有网络报表选项,也可以设置参数,但是参数只能通过公式获取,有时候需要传自定义参数时还是需要使用js脚本。
/** * FR10.0 超