Dim bd1 As New SQLGroupTableBuilder("库存现存量","AB_Barcode")
Dim dt1 As fxDataSource
bd1.C
bd1.AddTable("AB_Barcode","Barcode","AB_Barcodeio","Barcode")
bd1.Groups.AddDef("ItemMaster","存货编码") '根据型号分组
bd1.Groups.AddDef("cinvname","品名") '根据型号分组
bd1.Groups.AddDef("ItemFlag","膜类型") '根据型号分组
bd1.Groups.AddDef("diameter","宽度") '根据型号分组
bd1.Groups.AddDef("volume","厚度") '根据型号分组
bd1.Groups.AddExp("客户号","case when ItemFlag = 0 then Ccuscode else '' end") '根据型号分组
bd1.Totals.AddDef("AB_Barcode.Barcode",AggregateEnum.Count,"库存量" ) '对数量进行统计
bd1.Filter = "Whflag = 1 and IsCancel = 0 and ItemMaster in (''" & InvStrings & ") and volume >= " & ThickValueMin & " and volume <= " & ThickValueMax & " And (case when (ZwWhcode='" & bigWarehouse & "' and Ccuscode='KC') or ZwWhcode = '" & tdWarehouse & "' then 1 else 0 end) = 1 and diameter>=" & (e.Table.Current("最小宽度") + qb)
dt1 = bd1.BuildDataSource()
Dim bd2 As New SQLGroupTableBuilder("库存占用量","sc_BigFilmCut")
Dim dt2 As fxDataSource
bd2.C
bd2.Groups.AddDef("cInvCodeBig","存货编码") '根据型号分组
bd2.Groups.AddDef("iWidthBig","宽度") '根据型号分组
bd2.Groups.AddDef("iThickBig","厚度") '根据型号分组
bd2.Groups.AddExp("客户号","isnull(cNo,'')") '根据型号分组
bd2.Totals.AddDef("_Identify",AggregateEnum.Count,"占用量") '对数量进行统计
bd2.Filter = "isnull(cInvCodeBig,'') <> '' and isnull(iWidthBig,0) <> 0 and isnull(iThickBig,0) <> 0 and isnull(iMakeJoinID,0) = 0 and _Identify in (select iID fro m sc_BigFilmCutMX a inner join sc_BigFilmCut b on a.iID = b._Identify where isnull(bYD,0) = 0 and isnull(bComplete,0) = 0 or (isnull(bCut,0)=0 and isnull(bComplete,0) = 1 and isnull(b.cVerifier,'') = ''))"
dt2 = bd2.BuildDataSource()
Dim dt As DataTable = dt1.ConvetToDataTable()
If dt.DataRows.Count > 0 Then
Dim nms1 As String() = {"存货编码","宽度","厚度","客户号"}
Dim nms2 As String() = {"存货编码","宽度","厚度","客户号"}
dt1.Combine(nms1,dt2,nms2)
Else
DataTables("库存现存量").DataCols.Add("占用量",Gettype(Integer),"")
End If
If DataTables.Contains("库存现存量") Then
DataTables.Unload("库存现存量")
End If
dt1.Show("库存现存量")
当执行到【dt1.Show("库存现存量")】时狐表使用20151222版本时执行没有问题,如果使用当前最新版本时程序卡死在这里,狐表没有响应了,(最近的几个版本都不行),我再还原到20151222版本后,代码不变,执行就没有问题,是不是新版本后,和以前有些方法兼容有问题??急