Dim bd1 As New SqlGroUPTableBuilder("查询表_table5", "销售资料")
Dim dt1 As fxDataSource
bd1.groups.AddDef("销售商场")'根据型号分组
bd1.groups.AddDef("品牌")'根据型号分组
bd1.Groups.AddDef("销售型号")'根据型号分组
bd1.Groups.AddDef("销售日期", "月")
bd1.Totals.AddDef("数量")
bd1.Totals.AddDef("销售单价")
bd1.Filter = Filter
'bd1.Subtotal = True
'bd1.SubtotalLevel = 1
dt1 = bd1.BuildDataSource()
Tables("查询表_table5").DataSource = dt1 '将统计结果绑定到Table
Dim g As SubtotalGroup '定义一个新的分组
g = New SubtotalGroup
g.GroupOn = "销售商场" '分组列为客户
g.TotalOn = "数量,销售单价" '对数量和金额进行统计
'g = New SubtotalGroup
'g.GroupOn = "*" '分组列为客户
'g.TotalOn = "数量,销售单价" '对数量和金额进行统计
With Tables("查询表_Table5")
.SubtotalGroups.Clear() '清除原有的分组
.SubtotalGroups.Add(g) '加入刚刚定义的分组
.Subtotal() '生成汇总模式
End With
老师给看一下这是哪里的错误,,小计调出来了,总计没有了,,总计出来小计没有了,是哪里的毛病呀