老师:
请教一下,原来窗口是没有问题,但升级后只要CurrentChanged整个项目就无响应,就要重新启动.但在窗口预览又没有问题,请帮忙看看下面
CurrentChanged代码,谢谢
Dim t1 As Table = Tables("成品出入库_Table1")
Dim t2 As Table = Tables("成品出入库_Table2")
Dim t3 As Table = Tables("成品出入库_Table3")
Dim str As String = Nothing
With Tables("成品出入库_Table1")
If .Current Is Nothing Then
t2.Filter = "False"
Else
t2.Filter = "库存产品ID = '" & .Current("库存产品ID") & "'"
t2.Position = t2.Rows.Count - 1
If .Current("型号") > "" Then
str = str & "型号 = '" & .Current("型号") & "'"
End If
If str > "" Then
str = str & " And "
End If
If .Current("尺寸") > "" Then
str = str & "尺寸 = '" & .Current("尺寸") & "'"
Else
str = str & "尺寸 Is Null"
End If
If str > "" Then
str = str & " And 订单明细取消 = 0 And 交齐 = 0"
End If
Dim b As New GroupTableBuilder("订单明细统计表",DataTables("订单明细"))
b.Filter = str '仅统计客户为CS01的记录
b.Groups.AddDef("型号") '根据产品分组
b.Groups.AddDef("尺寸") '根据产品分组
b.Groups.AddDef("颜色") '根据产品分组
b.Groups.AddDef("材料") '根据产品分组
b.Groups.AddDef("五金") '根据产品分组
b.Groups.AddDef("其他") '根据产品分组
b.Groups.AddDef("单位") '根据产品分组
b.Totals.AddDef("未交数量") '对数量进行统计
b.Build
Tables("成品出入库_Table3").DataSource = DataTables("订单明细统计表")
Tables("成品出入库_Table3").SetColVisibleWidth("型号|80|尺寸|80|颜色|98|材料|108|五金|145|其他|235|单位|35|未交数量|80")
End If
End With