Dim tbName As String = e.Form.Name & "_Table1"
Dim t As Table = Tables(tbName)
Dim g As Subtotalgroup
t.SubtotalGroups.Clear()
t.TreeVisible = True
t.GroupAboveData = 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 = "总计"
t.SubtotalGroups.Add(g)
t.Subtotal() '生成汇总模式
小计和总计并不会显示