Dim b2 As New GroupTableBuilder("统计表2",DataTables("JKH荒料"))
Dim dt2 As fxDataSource
'Dim b2 As New SQLGroupTableBuilder("统计表2","JKH荒料")
b2.ConnectionName = "Foxtable-SQL"
b2.Filter = "[荒料状态] = '在途' And [中文品名] Is Not Null"
b2.Groups.AddDef("中文品名") '根据产品分组
'b2.Totals.AddDef("荒料编号",AggregateEnum.Count,"在途_颗数")
b2.Totals.AddDef("码单体积","已发运_在途_码单体积(M3)")
b2.Totals.AddDef("码单重量","已发运_在途_码单重(T)")
b2.Totals.AddDef("实时采购成本合计","已发运_在途_总成本(RMB)")
'b2.Build
dt2 = b2.BuildDataSource()
Dim b3 As New GroupTableBuilder("统计表2",DataTables("JKH荒料"))
Dim dt3 As fxDataSource
'Dim b2 As New SQLGroupTableBuilder("统计表2","JKH荒料")
b3.ConnectionName = "Foxtable-SQL"
b3.Filter = "[荒料状态] = '已到港未入库' And [中文品名] Is Not Null"
b3.Groups.AddDef("中文品名") '根据产品分组
'b3.Totals.AddDef("荒料编号",AggregateEnum.Count,"已到港未入库_颗数")
b3.Totals.AddDef("码单体积","已发运_已到港未入库_码单体积(M3)")
b3.Totals.AddDef("码单重量","已发运_已到港未入库_码单重(T)")
b3.Totals.AddDef("实时采购成本合计","已发运_已到港未入库_总成本(RMB)")
'b2.Build
dt3 = b3.BuildDataSource()
表名重复