如何在 birt 工具中删除或隐藏表中不需要的数据值



如何在 birt 工具中删除或隐藏表中不需要的数据值?

我尝试使用它在某些地方工作的值,但现在在具有多个值的组中。

我需要过滤一些不应该显示在表的数据选项卡中的值。

我有一列没有任何需要过滤掉的值(但它不是一个空值,因为当我检查时,我知道它有一些空格)。它应仅显示具有非空值的列。

如何从数据集中删除这些列。

当然,您可以尝试编写数据源查询的脚本,但也可以在创建表时对表运行脚本以隐藏空列。

在表的 onCreate 事件中尝试以下脚本:

var mycolumnCount = this.getRowData().getColumnCount();
var DisNull = false;
for(i=1;i<mycolumnCount;i++) {
var temp = this.getRowData().getColumnValue(i)
    if(this.getRowData().getColumnValue(i) == "") {
    DisNull = true;
    }else{
        DisNull = false;
        i = mycolumnCount+1;
        }
    }
if(DisNull == true) {
this.getStyle().display = "none"
}

相关内容

最新更新