Foxtable(狐表)用户栏目专家坐堂 → 筛选树改为加载树


  共有1814人关注过本帖平板打印复制链接

主题:筛选树改为加载树

帅哥哟,离线,有人找我吗?
15666282205
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:484 积分:3826 威望:0 精华:0 注册:2019/1/13 10:12:00
筛选树改为加载树  发帖心情 Post By:2019/12/5 9:31:00 [只看该作者]

老师,我编写了筛选树代码,运行正常,我模仿着帮助改为加载树,提示SQL语句错误,无法继续统计等等。请您看看。
正常的筛选树
'首先生成统计表
'Dim dt3 As DataTable
'Dim b3 As New GroupTableBuilder("统计表决算登记表",DataTables("决算登记表"))
'b3.Groups.AddDef("日期",DateGroupEnum.Year,"年")
'b3.Groups.AddDef("日期",DateGroupEnum.Month,"月")
'b3.Groups.AddDef("状态")
''b3.Groups.AddDef("考勤班组")
''b3.Groups.AddDef("考勤员")
'b3.Groups.AddDef("序号")
'b3.Groups.AddDef("编制人")
''b3.Groups.AddDef("所属班组")
'b3.Totals.AddDef("序号",AggregateEnum.Count,"次数") '根据客户列来统计记录数,也就是订单数
'dt3 = b3.Build(True) '参数设置为True,生成一个临时表,不在主界面显示
''然后根据统计表生成目录树
'Dim trv3 As WinForm.TreeView = e.Form.Controls("TreeView1")
'trv3.BuildTree(dt3, "年|月|编制人|状态")
'trv3.StopRedraw
'For Each nd As WinForm.TreeNode In trv3.AllNodes
'Dim Year As Integer = nd.DataRow("年")
'Dim Month As Integer = nd.DataRow("月")
'Dim Product4 As String = nd.DataRow("状态")
'Dim Product5 As String = nd.DataRow("编制人")
''Dim Product6 As String = nd.DataRow("生产工段")
'' Dim Product3 As String = nd.DataRow("提交人")
''Dim Product7 As String = nd.DataRow("  ")
'Select Case nd.Level
'Case 0
'nd.Text = nd.text & "年(" & dt3.Compute("Sum(次数)","年 = " & Year) & ")"
'Case 1
'nd.Text = nd.text & "月(" & dt3.Compute("Sum(次数)","年 = " & Year & " And 月 = " & Month) & ")"
'Case 2
'nd.Text = nd.text & "(" & dt3.Compute("Sum(次数)","年 = " & Year & " And 月 = " & Month & " And  编制人 = '" & nd.Text & "'") & ")"
'Case 3
'nd.Text = nd.text & "(" & dt3.Compute("Sum(次数)","年 = " & Year & " And 月 = " & Month & " And  编制人 = '" & Product5 & "' And 状态 = '" & nd.Text & "'") & ")"
''Case 4
''nd.Text = nd.text & "(" & dt3.Compute("Sum(次数)","年 = " & Year & " And 月 = " & Month & " And  部门 = '" & Product6 & "' And  考勤班组 = '" & Product3 & "'  And  考勤员 = '" & nd.Text & "'") & ")"
''Case 5
''nd.Text = nd.text & "(" & nd.DataRow("次数") & ")"
'End Select
'Next
'trv3.Nodes.Insert("显示所有行","显示所有行(" & dt3.Compute("Sum(次数)") & ")",0)
'trv3.ResumeRedraw
研究了半天加载树,区别就是第二行,我改成了这样
Dim b3 As New SQLGroupTableBuilder("统计表决算登记表","决算登记表")
其他的没动。请您指点。

 回到顶部
总数 14 1 2 下一页