改为用汇总模式吧:
Dim g As New SQLCrossTableBuilder("统计表","明细数据")g.HGroups.AddDef("日期", DateGroupEnum.None)g.VGroups.AddDef("部门")g.Totals.AddDef("数量", "数量")g.Subtotal = Trueg.Build()MainTable = Tables("统计表")