不为什么不用分组统计?最方便就是分组统计。
或者你可以用汇总模式
Dim t As Table = Tables("订单")
Dim g As Subtotalgroup
t.ResumeRedraw()
t.StopRedraw()
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()
t.Grid.Tree.Show(0)
t.ResumeRedraw()