--
If mx.Checked Then
Dim bd1 As New GroupTableBuilder("直调出库",SqlZdckd,"EFSG")
Dim dt1 As fxDataSource
bd1.Groups.AddDef("款号") \'根据型号分组
bd1.Groups.AddDef("花色")
bd1.Groups.AddDef("尺码")
bd1.Groups.AddDef("仓库")
bd1.Groups.AddDef("品类")
bd1.Groups.AddDef("品名")
bd1.Groups.AddDef("吊牌价")
bd1.Totals.AddDef("数量","直调出库单_数量")
dt1 = bd1.BuildDataSource()
Dim bd2 As New GroupTableBuilder("直调入库",SqlZdrkd,"EFSG")
Dim dt2 As fxDataSource
bd2.Groups.AddDef("款号") \'根据型号分组
bd2.Groups.AddDef("花色")
bd2.Groups.AddDef("尺码")
bd2.Groups.AddDef("仓库")
bd2.Groups.AddDef("品类")
bd2.Groups.AddDef("品名")
bd2.Groups.AddDef("吊牌价")
bd2.Totals.AddDef("数量","直调入库单_数量")
dt2 = bd2.BuildDataSource()
Dim bd3 As New GroupTableBuilder("采购收货",SqlCgshd,"EFSG")
Dim dt3 As fxDataSource
bd3.Groups.AddDef("款号") \'根据型号分组
bd3.Groups.AddDef("花色")
bd3.Groups.AddDef("尺码")
bd3.Groups.AddDef("仓库")
bd3.Groups.AddDef("品类")
bd3.Groups.AddDef("品名")
bd3.Groups.AddDef("吊牌价")
bd3.Totals.AddDef("数量","采购收货_数量")
dt3 = bd3.BuildDataSource()
Dim bd4 As New GroupTableBuilder("采购退货",SqlCgthd,"EFSG")
Dim dt4 As fxDataSource
bd4.Groups.AddDef("款号") \'根据型号分组
bd4.Groups.AddDef("花色")
bd4.Groups.AddDef("尺码")
bd4.Groups.AddDef("仓库")
bd4.Groups.AddDef("品类")
bd4.Groups.AddDef("品名")
bd4.Groups.AddDef("吊牌价")
bd4.Totals.AddDef("数量","采购退货_数量")
dt4 = bd4.BuildDataSource()
Dim bd5 As New GroupTableBuilder("销售",SqlXsmx,"EFSG")
Dim dt5 As fxDataSource
bd5.Filter="销售类型码<>\'B\'"
bd5.Groups.AddDef("款号") \'根据型号分组
bd5.Groups.AddDef("花色")
bd5.Groups.AddDef("尺码")
bd5.Groups.AddDef("仓库")
bd5.Groups.AddDef("品类")
bd5.Groups.AddDef("品名")
bd5.Groups.AddDef("吊牌价")
bd5.Totals.AddDef("数量","销售_数量")
dt5 = bd5.BuildDataSource()
Dim bd6 As New GroupTableBuilder("退货",SqlXsmx,"EFSG")
Dim dt6 As fxDataSource
bd6.Filter="销售类型码=\'B\'"
bd6.Groups.AddDef("款号") \'根据型号分组
bd6.Groups.AddDef("花色")
bd6.Groups.AddDef("尺码")
bd6.Groups.AddDef("仓库")
bd6.Groups.AddDef("品类")
bd6.Groups.AddDef("品名")
bd6.Groups.AddDef("吊牌价")
bd6.Totals.AddDef("数量","退货_数量")
dt6 = bd6.BuildDataSource()
Dim bd7 As New GroupTableBuilder("库存调整入",SqlKctzr,"EFSG")
Dim dt7 As fxDataSource
bd7.Groups.AddDef("款号") \'根据型号分组
bd7.Groups.AddDef("花色")
bd7.Groups.AddDef("尺码")
bd7.Groups.AddDef("仓库")
bd7.Groups.AddDef("品类")
bd7.Groups.AddDef("品名")
bd7.Groups.AddDef("吊牌价")
bd7.Totals.AddDef("数量","库存调整入_数量")
dt7 = bd7.BuildDataSource()