Dim ary1() As String = {"款号", "条码号", "颜色", "尺码"}
Dim ary2() As String = {"款号", "条码号", "颜色", "尺码"}
Dim g As New GroupTableBuilder("统计表1", DataTables("盘点表"))
Dim dt1 As fxDataSource
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(ary1,dt2,ary2)
dt1.Combine(ary1,dt3,ary2)
dt1.Combine(ary1,dt4,ary2)
Tables("汇总表 _Table1").DataSource = dt1 '将统计结果绑定到Table