Dim t As Table = Tables("窗口1_Table1") Dim g As SubtotalGroup t.SubtotalGroups.Clear() t.GroupAboveData = False t.TreeVisible = False g = New SubtotalGroup g.Aggregate = AggregateEnum.Sum g.GroupOn = "产品" g.Caption = "{0}" t.SubtotalGroups.Add(g) t.Subtotal()