Dim cmd As new SQLCommand
cmd.C
cmd.CommandText = "sele ct * from {进出仓明细视图} where 审核日期 BETWEEN '1/1/2018' AND '12/31/2019' and (单据名称 = '领料单' and 物料代码 = '3.04.02.0053')"
Dim sdt As DataTable = cmd.ExecuteReader
Tables(e.Form.Name & "_Table2").DataSource = sdt
Dim g As New GroupTableBuilder("月用量分析表", sdt)
g.Groups.AddDef("物料代码")
g.Groups.AddDef("日期", DateGroupEnum.Year, "年")
g.Totals.AddDef("实收数量")
tb.DataSource = g.Build()
Dim dt As DataTable = DataTables("月用量分析表")
‘Dim dt As DataTable = tb.DataTable 这样声明也试过
If dt.DataCols.Contains("月数") = False Then dt.DataCols.Add("月数", Gettype(Double))
.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2020.4.19.8
错误所在事件:窗口,月用量分析,But分析2,Click
详细错误信息:
列“月数”不属于表 月用量分析表。
[此贴子已经被作者于2020/4/27 13:51:39编辑过]