动态绑定列://通过判断列表参数的值与表格绑定的值的数量相等,不相等则清空表
if(Table1.binding.colCount>(param1.getSelectedObjects().length+param1.getSelectedObjects().length)){
Table1.binding.clearCols();
}
//循环绑定度量字段
for(var i=0;i<param2.getSelectedObjects().length;i++){
Table1.binding.addCol(i,new MeasureCol(SUM,new BCol(param2.getSelectedObjects(),DOUBLE,false),null));
}
//循环绑定维度字段
for(var j=0;j<param1.getSelectedObjects().length;j++){
Table1.binding.addCol(j,new DimCol(new BCol(param1.getSelectedObjects()[j],STRING,true)));
} |