为什么如下代码老提示
错误所在事件:窗口,入库单,Button_刷新,Click
详细错误信息:
未找到列 [超级管理员]。
Dim g As New SQLGroupTableBuilder("TJB", e.Form.Name)
g.C
g.Groups.AddDef("创建者")
g.Groups.AddDef("创建时间", DateGroupEnum.Year, "年")
g.Groups.AddDef("创建时间", DateGroupEnum.Month, "月")
g.Groups.AddDef("创建时间", DateGroupEnum.Day, "日")
g.Totals.AddDef("ID", AggregateEnum.Count, "行数")
Dim gt As DataTable = g.Build(True) '参数设置为true,生成一个临时表,用完就销毁了
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree(gt, "创建者|年|月|日")
trv.StopRedraw
For Each nd As WinForm.TreeNode In trv.AllNodes
Dim nq As String = nd.DataRow("创建者")
Dim Year As Integer = nd.DataRow("年")
Dim Month As Integer = nd.DataRow("月")
Dim Day As String = nd.DataRow("日")
Select Case nd.Level
Case 0
nd.Text = nd.text & " (" & gt.Compute("Sum(行数)", "创建者 = " & nq) & "条)" 这个代码不行吗,是不是不能用string作为统计呢么
'Case 1
'nd.Text = nd.text & "年(" & gt.Compute("Sum(行数)", "创建者 = " & Cjz & " and 年 = " & Year) & "条)"
'Case 2
'nd.Text = nd.text & "月(" & gt.Compute("Sum(行数)", "创建者 = " & Cjz & " and 年 = " & Year & " And 月 = " & Month) & "条)"
'Case 3
'nd.Text = nd.text & "日(" & gt.Compute("Sum(行数)", "创建者 = " & Cjz & " and 年 = " & Year & " And 月 = " & Month & " And 日 = " & Day) & "条)"
End Select
Next
trv.Nodes.Insert("[显示所有行]", "显示所有行(" & Val(gt.Compute("Sum(行数)")) & "条)", 0)
trv.ResumeRedraw