点击参数面板按钮跳转

在表单frm模板里面,参数面板拖入按钮,怎么设置点击事件:点击按钮后,跳转至另一个报表(以对话框的形式,不需要传参)

image.png

FineReport Scyalcire 发布于 2021-1-12 15:18 (编辑于 2021-1-12 15:59)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共3回答
最佳回答
1
LSQ000Lv5中级互助
发布于2021-1-12 15:23(编辑于 2021-1-12 16:09)

//增加点击事件

var $iframe = $("<iframe id='inp' name='inp' width='100%' height='100%' scrolling='no' frameborder='0'>"); // iframe参数的命名及宽高等

var url = FR.cjkEncode("${servletURL}?viewlet=FReport/信息/运维管理/人力综合子报表(区间段).frm");

$iframe.attr("src"

, url); //对话框中显示的子报表

var o = {

title : "对话框标题",

width : 1000,

height: 500

};

FR.showDialog(o.title, o.width, o.height, $iframe,0); //首先弹出对话框

image.png
image.png


最佳回答
1
snrtuemcLv8专家互助
发布于2021-1-12 15:36

点击事件,js代码

var url = FR.cjkEncode("/webroot/decision/view/report?viewlet=GettingStarted.cpt&op=write");
//窗体
var $iframe = $("<iframe id='inp' name='inp' width='100%' height='100%' scrolling='no' frameborder='0'>");
//将窗体的src属性设置为模板路径
$iframe.attr("src", url);
//窗体的属性
var o = {
    title: "对话框",    //标题
    width: 680,         //宽度
    height: 640,        //高度
    //closable:true,    //是否显示关闭按钮,默认true
    //confirm:true,     //是否添加确认取消按钮,默认false
    //draggable:true   //是否可拖动,默认true
};
//弹出窗体
FR.showDialog(o.title, o.width, o.height, $iframe, o);


  • Scyalcire Scyalcire(提问者) 适用frm吗?主要是我这个模板不是cpt的
    2021-01-12 15:40 
  • snrtuemc snrtuemc 回复 Scyalcire(提问者) 适用的,你是10.0的版本的话,一楼给你的报表地址是错误的格式,按我的地址格式来
    2021-01-12 15:44 
  • Scyalcire Scyalcire(提问者) 回复 snrtuemc 嗯,我的是8.0
    2021-01-12 15:46 
  • snrtuemc snrtuemc 回复 Scyalcire(提问者) 参考根据(不同)内容超链接到不同网址-http://help.finereport.com/finereport8.0/doc-view-1839.html 你URL直接使用要打开页面的预览地址试一下
    2021-01-12 15:53 
  • Scyalcire Scyalcire(提问者) 回复 snrtuemc 一楼的方法可以,但是如果我的路径里面有中文的话 就打不开了 我拿一个纯英文名字的报表就可以跳转
    2021-01-12 15:54 
最佳回答
0
axingLv6专家互助
发布于2021-1-12 16:07(编辑于 2021-1-12 16:08)
FR.doHyperlinkByPost({
    "url": "/webroot/decision/view/report?viewlet=%252F111.cpt",
    "para": {"地区": "华北"},
    "target": "_dialog",
    "feature": {     //窗口属性
            "width": 600,
            "height": 400,
            "isCenter": true,  // 居中展示
            "title": "test"
            }
})

image.png

image.png

  • 6关注人数
  • 1217浏览人数
  • 最后回答于:2021-1-12 16:09
    请选择关闭问题的原因
    确定 取消
    返回顶部