Dim g As New GroupTableBuilder("统计表1", DataTables("盘点表"))
Dim dt1 As fxDataSource
g.Groups.AddDef("款号")
'g.Groups.AddDef("条码号","入库_条码号")
'g.Groups.AddDef("颜色","入库_颜色")
'g.Groups.AddDef("尺码","入库_尺码")
'g.Groups.AddDef("入库日期","入库_入库日期")
g.Totals.AddDef("实盘数","入库_实盘数")
dt1 = g.BuildDataSource()
'-------销售表 ------------(销售表)
Dim h As New GroupTableBuilder("统计表2", DataTables("销售表"))
Dim dt2 As fxdatasource
h.Groups.AddDef("款号")
'h.Groups.AddDef("条码号","销售_条码号")
'h.Groups.AddDef("颜色","销售_颜色")
'h.Groups.AddDef("尺码","销售_尺码")
'h.Groups.AddDef("销售日期","销售_销售日期")
'
h.Totals.AddDef("件数","销售_件数")
dt2 = h.BuildDataSource()
'---------------调入----------(入库表)
Dim j As New GroupTableBuilder("统计表3", DataTables("入库表"))
Dim dt3 As fxdatasource
j.groups.adddef("款号")
'j.Groups.AddDef("条码号","入库_条码号")
'j.Groups.AddDef("尺码","入库_尺码")
'j.Groups.AddDef("颜色","入库_颜色")
'j.Groups.AddDef("入库日期","入库_入库日期")
'j.Groups.AddDef("入库渠道","入库_入库渠道")
j.Totals.AddDef("件数","入库_件数")
dt3 = j.BuildDataSource()
'--------------调出 ----------(出库表)
Dim k As New GroupTableBuilder("统计表4", DataTables("出库表"))
Dim dt4 As fxdatasource
k.Groups.AddDef("款号")
'k.Groups.AddDef("条码号","出库_条码号")
'k.Groups.AddDef("尺码","出库_尺码")
'k.Groups.AddDef("颜色","出库_颜色")
'k.Groups.AddDef("出库日期","出库_出库日期")
'k.Groups.AddDef("收货地点","出库_收货地点")
k.Totals.AddDef("件数","出库_件数")
dt4 =k.BuildDataSource()
dt1.Combine("款号",dt2,"款号")
dt1.Combine("款号",dt3,"款号")
dt1.combine("款号",dt4,"款号")
Tables("出入库汇总表_Table1").DataSource = dt1 '将统计结果绑定到Table