提示框:FR.showDialog(标题,宽,高,'内容') FR.showDialog(12,500,300,'内容')
可以自定义提示内容:以对话框形式弹出主子表这个报表
var url = "http://localhost:8075/webroot/decision/view/report?viewlet=主子表.cpt" //跳转地址
var iframe = $("<iframe width='100%' height='100%' scrolling='yes' frameborder='0'>");
iframe.attr("src", url);
var o = {
width: 800, //对话框宽度
height: 550 //对话框高度
};
FR.showDialog("test", o.width, o.height, iframe); //弹出对话框
关闭对话框,可以点击右上角的X,也可以在弹出的界面添加按钮,执行如下js,parent.FR.closeDialog()即为关闭
-----------------------------------------------------------------------------------------
网页跳转
var url="http://localhost:8075/webroot/decision/view/report?viewlet=参数入门.cpt"; // 跳转地址
var config={地区1:"华北"}; //参数
var target="_blank"; //超链属性:_blank,_self,_dialog
var feature={width:800,height:450}; //对话框大小
FR.doHyperlinkByGet(url,config,target,feature);
post跳转方式是一样的FR. doHyperlinkByPost(url,config,target,feature)
执行公式9.0以后不再支持
FR.remoteEvaluate('=公式’)
"${=公式}“
例子:
var a=FR.remoteEvaluate("format(today(),'yyyy-MM-dd')");
var b=FR.remoteEvaluate("sum(1,2)");
var c=FR.remoteEvaluate("sql('FRDemo','select 产品名称 from S产品 where 产品ID=1',1,1)");
alert("a的值为:"+a+" | b的值为:"+b+" | c的值为:"+c);