Dim ny As WinForm.TextBox = e.Form.Controls("TextBox188")
e.form.controls("TextBox199").Text = e.form.controls("TextBox188").Text
e.form.controls("TextBox200").Text = e.form.controls("TextBox188").Text
Dim g As New GroupTableBuilder("统计表1", DataTables("明细根表"))
g.Groups.AddDef("运输审核_结算月")
g.Groups.AddDef("运输审核_生日", "生日")
g.Groups.AddDef("FZSYXCCFMC")
g.Groups.AddDef("生产信息_等级强度")
g.Groups.AddDef("FZSYXCBB")
g.Groups.AddDef("FZSYXCBZ")
g.Groups.AddDef("FZSYXCLX", "类型")
g.Groups.AddDef("FZSYXCYCSM", "异常_说明")
g.Totals.AddDef("FZSYXCYS", "运生_差量")
g.Totals.AddDef("FZSYXCXY", "销运_差量")
g.Totals.AddDef("FZSYXCXS", "销生_差量")
g.Filter = "[运输审核_结算月] = '" & ny.text & "' and [FZSYXCB] is not Null"
Tables("统计总表_Table175").DataSource = g.BuildDataSource()
DataTables("统计总表_Table175").DataCols.Add("运生_说明", GetType(String), 255 , "IIF([运生_差量] = 0 , Null ,IIF([类型] = '多记' or [类型] = '少记' or [类型] = '他产' or [类型] = '取样' or [类型] = '报废' or [类型] = '不结',[FZSYXCCFMC] + [FZSYXCBZ] + [类型] + [运生_差量] + '方' + [生产信息_等级强度] + ';',IIF([类型] = '多产' or [类型] = '少产' or [类型] = '自运' or [类型] = '多签' or [类型] = '少签' ,[FZSYXCCFMC] + [类型] + [运生_差量] + '方' + [生产信息_等级强度] + ';',IIF([类型] = '剩料' or [类型] = '退料' ,[FZSYXCCFMC] + [类型] + [运生_差量] + '方' + [FZSYXCBB] + [FZSYXCBZ], IIF([类型] = '异日' ,[FZSYXCCFMC] + [FZSYXCBZ] + '运输' + [运生_差量] + '方' + [生产信息_等级强度] + ';',NuLL )))))")
DataTables("统计总表_Table175").DataCols.Add("销运_说明", GetType(String), 255 , "IIF([销运_差量] = 0 , Null ,IIF([类型] = '多记' or [类型] = '少记' or [类型] = '他产' or [类型] = '取样' or [类型] = '报废' or [类型] = '不结',[FZSYXCCFMC] + [FZSYXCBZ] + [类型] + [销运_差量] + '方' + [生产信息_等级强度] + ';',IIF([类型] = '多产' or [类型] = '少产' or [类型] = '自运' or [类型] = '多签' or [类型] = '少签' ,[FZSYXCCFMC] + [类型] + [销运_差量] + '方' + [生产信息_等级强度] + ';',IIF([类型] = '剩料' or [类型] = '退料' ,[FZSYXCCFMC] + [类型] + [销运_差量] + '方' + [FZSYXCBB] + [FZSYXCBZ], Null ))))")
DataTables("统计总表_Table175").DataCols.Add("销生_说明", GetType(String), 255 , "IIf([销生_差量] = 0 , Null ,IIF([类型] = '多记' or [类型] = '少记' or [类型] = '他产' or [类型] = '取样' or [类型] = '报废' or [类型] = '不结',[FZSYXCCFMC] + [FZSYXCBZ] + [类型] + [销生_差量] + '方' + [生产信息_等级强度] + ';',IIF([类型] = '多产' or [类型] = '少产' or [类型] = '自运' or [类型] = '多签' or [类型] = '少签' ,[FZSYXCCFMC] + [类型] + [销生_差量] + '方' + [生产信息_等级强度] + ';',IIF([类型] = '剩料' or [类型] = '退料' ,[FZSYXCCFMC] + [类型] + [销生_差量] + '方' + [FZSYXCBB] + [FZSYXCBZ], IIF([类型] = '异日' ,[FZSYXCCFMC] + [FZSYXCBZ] + '销售' + [销生_差量] + '方' + [生产信息_等级强度] + ';',NuLL )))))")
Tables("统计总表_Table175").Cols("运生_差量").Move(7)
Tables("统计总表_Table175").Cols("运生_说明").Move(8)
Tables("统计总表_Table175").Cols("销运_差量").Move(9)
Tables("统计总表_Table175").Cols("销运_说明").Move(10)
Tables("统计总表_Table175").Cols("销生_差量").Move(11)
Tables("统计总表_Table175").Cols("销生_说明").Move(12)
Tables("统计总表_Table175").Cols("运输审核_结算月").Visible = False
Tables("统计总表_Table175").Cols("FZSYXCCFMC").Visible = False
Tables("统计总表_Table175").Cols("生产信息_等级强度").Visible = False
Tables("统计总表_Table175").Cols("FZSYXCBB").Visible = False
Tables("统计总表_Table175").Cols("FZSYXCBZ").Visible = False
Tables("统计总表_Table175").AutoSizeCols()
With DataTables("统计总表_Table176")
.DataCols("第一列").Caption = "生日"
.DataCols("第二列").Caption = "运生_差量"
.DataCols("第三列").Caption = "运生_说明"
.DataCols("第四列").Caption = "销运_差量"
.DataCols("第五列").Caption = "销运_说明"
.DataCols("第六列").Caption = "销生_差量"
.DataCols("第七列").Caption = "销生_说明"
.DataCols("第八列").Caption = "异常_说明"
.BuildHeader()
End With
For Each s As String In DataTables("统计总表_Table175").getvalues("生日")
Dim r As Row = Tables("统计总表_Table176").addnew
r("运生_差量") = DataTables("统计总表_Table175").compute("sum(FZSYXCYS)", "生日='" & s & "'")
r("运生_说明") = DataTables("统计总表_Table175").GetComboListString("运生_说明", "生日='" & s & "'").replace("|", "")
r("销运_差量") = DataTables("统计总表_Table175").compute("sum(FZSYXCXY)", "生日='" & s & "'")
r("销运_说明") = DataTables("统计总表_Table175").GetComboListString("销运_说明", "生日='" & s & "'").replace("|", "")
r("销生_差量") = DataTables("统计总表_Table175").compute("sum(FZSYXCXS)", "生日='" & s & "'")
r("销生_说明") = DataTables("统计总表_Table175").GetComboListString("销生_说明", "生日='" & s & "'").replace("|", "")
r("异常_说明") = DataTables("统计总表_Table175").GetComboListString("异常_说明", "生日='" & s & "'").replace("|", "")
Next
运行后错误的提示是:
.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2022.6.12.1
错误所在事件:窗口,统计总表,Button182,Click
详细错误信息:
未找到列 [FZSYXCYS]。
请老师,帮我看下,