试一下
// 在帆软报表的「模板Web属性」-「加载结束事件」中添加
contentPane.on("load", function() {
const firstRowCell = this.getCell(0, 0); // 获取首行首列单元格
if (firstRowCell && firstRowCell.getValue() === "广州") {
this.setRowFrozen(1); // 冻结首行(参数为冻结行数)
} else {
this.setRowFrozen(0); // 取消冻结
}
});
----若首行为标题行,需改用contentPane.getWidgetByName("表格名称").getCell(0,0)
----数据量大就套一层延迟执行函数setTimeout