用自定义按钮汇总吧。
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 = "应收金额,收款金额"
g.Caption = "{0} 小计"
t.SubtotalGroups.Add(g)
g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "月份_年"
g.TotalOn = "应收金额,收款金额"
g.Caption = "{0} 小计"
t.SubtotalGroups.Add(g)
t.Subtotal()
Dim r As Row
For i As Integer = 0 To Tables("应收款").Rows.Count(True) - 1
r = Tables("应收款").Rows(i,True)
If r.IsGroup
r("未收金额") = r("应收金额") - r("收款金额")
End If
Next