Dim bd1 As New GroupTableBuilder("统计表1",DataTables("入库表"))
Dim dt1 As fxDataSource
bd1.Groups.AddDef("品名") '根据品名分组
bd1.Totals.AddDef("重量","入库_重量") '对重量进行统计
bd1.Totals.AddDef("匹数","入库_匹数") '对匹数进行统计
bd1.Subtotal = True
dt1 = bd1.BuildDataSource()
Dim bd2 As New GroupTableBuilder("统计表2",DataTables("库存表"))
Dim dt2 As fxDataSource
bd2.Groups.AddDef("品名") '根据品名分组
bd2.Totals.AddDef("重量","库存_重量") '对重量进行统计
bd2.Totals.AddDef("匹数","库存_匹数") '对匹数进行统计
bd2.Subtotal = True
dt2 = bd2.BuildDataSource()
Dim bd3 As New GroupTableBuilder("统计表3",DataTables("出库表"))
Dim dt3 As fxDataSource
bd3.Groups.AddDef("品名") '根据品名分组
bd3.Totals.AddDef("重量","出库_重量") '对重量进行统计
bd3.Totals.AddDef("匹数","出库_匹数") '对匹数进行统计
bd3.Subtotal = True
dt3 = bd3.BuildDataSource()
dt1.Combine("品名",dt2,"品名") '将库存统计数据组合到入库统计数据
dt1.Combine("品名",dt3,"品名") '将出库统计数据组合到入库统计数据
Tables("统计窗口_Table1").DataSource = dt1 '将统计结果绑定到Table
上面的代码每个表增加了汇总模式,合并时只有入库的有合计,怎么把其他的两个也组合进去?