使用宏和表达式来抑制多个重复列。
首先,创建一个宏来确定列是否应该被显示。例如,如果要抑制重复的公司名称列,您可以创建以下宏:
// Check if the current column is the first column for the current group
if (this.getDisplayValue().equals(this.getPreviousRow().getDisplayValue())) {
false;
} else {
true;
}
接下来,在表格的普通显示属性中,使用条件格式化器来调用宏并隐藏需要抑制的列。例如:
Expression:myMacro()
Background Color:Transparent
Font Color:Black
现在,当表格运行时,重复的列将被抑制。