用小计汇总功能实现:
Dim t As Table = Tables("应收账款池表")
Dim g As Subtotalgroup
t.SubtotalGroups.Clear()
t.GroupAboveData = False
t.TreeVisible = False
t.SpillNode = True
g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "买方企业全称"
g.TotalOn = "fa piao金额"
g.Caption = "{0} 小计"
t.SubtotalGroups.Add(g)
g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "*"
g.TotalOn = "fa piao金额"
g.Caption = "总计"
t.SubtotalGroups.Add(g)
t.Subtotal()