Dim g As New CrossTableBuilder("统计表1", DataTables("明细表2"))
g.HGroups.AddDef("客户")
g.VGroups.AddDef("区间")
g.Totals.AddDef("余额", "余额")
g.HorizontalTotal = True
g.HorizontalProportion = True
g.Build()
MainTable = Tables("统计表1")
Dim Cs() As String = {1,2,3,4,5,6}
Dim t As Table = Tables("统计表1")
Dim len As Integer = 1
For i As Integer = 0 To cs.length - 1
If i+len >= t.Cols.count Then
t.DataTable.DataCols.Add("动态_" & cs(i), Gettype(Double), "",cs(i))
Else
If t.Cols(i+len).Caption <> cs(i) Then
t.DataTable.DataCols.Add("动态_" & cs(i), Gettype(Double), "",cs(i))
t.cols("动态_" & cs(i)).move(i+len)
End If
End If
Next
开启占比后,新的问题,汗