尝试过的方法与错误
方法1:直接使用JavaScript引用单元格
javascript
javascript:window.open(I2, "_blank")
错误:CustomJSError : I2 is not defined
原因:JavaScript无法直接识别Excel单元格引用格式(I2)
方法2:使用_g().getFreeCell函数
javascript
var row = FR.cellRow;
var url = _g().getFreeCell(9, row).getValue();
if(url && url.length > 0) {
window.open(url, "_blank");
}
错误:CustomJSError : _g(...).getFreeCell is not a function
原因:在FineReport的超链接JavaScript中,_g().getFreeCell方法不可用