-- 请前辈看下为啥这三表合并不了
Dim g As New GroupTableBuilder("进货表", DataTables("ic_t_inout_store_detail"))
Dim dt1 As fxDataSource
\'g.Groups.AddDef("sheet_no")
g.Groups.AddDef("barcode")
g.Totals.AddDef("in_qty", "进货_数量")
g.Totals.AddDef("金额", "进货_金额")
g.Filter = "[sheet_no] Like \'PI%\'"
dt1 = g.BuildDataSource()
Dim g2 As New GroupTableBuilder("销售流水表", DataTables("pos_t_saleflow"))
Dim dt2 As fxDataSource
g2.Groups.AddDef("商品条码")
\'g.Groups.AddDef("商品名称")
g2.Totals.AddDef("sale_qnty", "销售_数量")
g2.Totals.AddDef("实际金额", "销售_金额")
g2.Filter = "[商品属性] = 0118 And sell_way = \'A\'"
dt2 = g2.BuildDataSource()
Dim g3 As New GroupTableBuilder("销售退货表", DataTables("pos_t_saleflow"))
Dim dt3 As fxDataSource
g3.Groups.AddDef("商品条码")
\'2.Groups.AddDef("商品名称")
g3.Totals.AddDef("sale_qnty", "退货_数量")
g3.Totals.AddDef("实际金额", "退货_金额")
g3.Filter = "[商品属性] = " & txt & " and sell_way = \'B\'"
dt3 = g3.BuildDataSource()
dt1.Combine("barcode",dt2,"商品条码")
dt1.Combine("barcode",dt3,"商品条码")
Tables("库销存_Table1").DataSource = dt1 \'将统计结果绑定到Table
这是代码, 情况是 每一个表单独Tables("库销存_Table1").DataSource = dt1、2、3 都能显示出来 唯独combine一合并 只显示dt1的 dt2dt3的不显示