以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  like  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=153581)

--  作者:outcat
--  发布时间:2020/8/15 15:35:00
--  like

图片点击可在新窗口打开查看此主题相关图片如下:qq截图20200815153025.jpg
图片点击可在新窗口打开查看

Dim trv9 As WinForm.TreeView = e.Form.Controls("TreeView9")
Trv9.BuildTree("司机类型表","司机类型","", "编号")
trv9.StopRedraw \'停止绘制目录树
For Each nd9 As WinForm.TreeNode In trv9.AllNodes \'遍历所有节点
    Dim sjlx As String = "\'" & nd9.DataRow("司机类型") & "\'"
    If nd9.Level = 0 Then \'如果是一级节点
               nd9.Text = nd9.text & "(" & dt9.Compute("Sum(数量)","司机类型 =" & sjlx) & "条)"
    End If
Next
图片点击可在新窗口打开查看此主题相关图片如下:qq截图20200815153025.jpg
图片点击可在新窗口打开查看
trv9.Nodes.Insert("显示全部","显示全部(" & dt9.Compute("Sum(数量)") & "条)",0)
trv9.ResumeRedraw \'恢复绘制目录

老师,我要统计个数, 红色代码,我想变成 like 让数据统计正确,可怎么也弄不对,请老师赐教了

--  作者:有点蓝
--  发布时间:2020/8/15 15:54:00
--  
……
For Each nd9 As WinForm.TreeNode In trv9.AllNodes \'遍历所有节点
    Dim sjlx As String = "\'%," & nd9.DataRow("司机类型") & ",%\'"
    If nd9.Level = 0 Then \'如果是一级节点
               nd9.Text = nd9.text & "(" & dt9.Compute("Sum(数量)","\',\'+司机类型+\',\' like " & sjlx) & "条)"
    End If
Next