Dim t As Table = Tables("窗口1_table1")
Dim g As Subtotalgroup
t.SubtotalGroups.Clear()
t.GroupAboveData = True
t.TreeVisible = True
t.SpillNode = True
g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "第三列"
g.TotalOn = "第五列,第七列"
g.Caption = "{0} 小计"
t.SubtotalGroups.Add(g)
t.Subtotal()
For i As Integer = 0 To t.Rows.count(True)-1
Dim r As Row = t.Rows(i, True)
If r.IsGroup Then
Dim nr = t.Rows(i+1, True)
r("第二列") = nr("第二列")
r("第三列") = nr("第三列")
r("第四列") = nr("第四列")
r("第六列") = nr("第六列")
r("第八列") = nr("第八列")
r("第九列") = nr("第九列")
r("第十列") = nr("第十列")
r("备注") = nr("备注")
End If
Next