finereport JS 获取按钮所在单元格的值及获取当前报表的变量

时间:2019-10-19 11:11:30   收藏:0   阅读:903

1、通过按钮获取单元格所在的值

debugger;
var cr;
if(window.lineboxes) {  
    var cells = [];  
    for (var i = 0; i < lineboxes.length; i++) {  
    if (lineboxes[i].selected()) {  
        cells[cells.length] = lineboxes[i].options.location;
        cr=FR.cellStr2ColumnRow(window.lineboxes[i].options.location);   
        }  
    }
    
    if(cells.length==0 || cells.length>1){
        FR.Msg.alert("警告","请选择一个计划任务进行查看!");
        }else{
var yearsmonth=_g().getCellValue(3, cr.row)
var bmid=_g().getCellValue(7, cr.row) //7是部门ID 9是部门名称
//FR.Msg.alert(bmid,"666")
window.open("${servletURL}?reportlet=/?/?.cpt&op=write_plus&yearsmonth="+yearsmonth+"&bmid="+bmid)


   }
}

2、获取变量的实时变化的值

var a=this.options.form.getWidgetByName("name").getValue();

 

原文:https://www.cnblogs.com/wuzaipei/p/11703076.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!