以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  筛选统计中表达式写得不正确,求正解  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=113022)

--  作者:dxjwlf
--  发布时间:2018/1/7 10:49:00
--  筛选统计中表达式写得不正确,求正解
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree(dt, "流程|年|主体名称","","流程,年,受理时间 DESC")
trv.StopRedraw
For Each nd As WinForm.TreeNode In trv.AllNodes
    Dim Year As Integer= nd.DataRow("年")
    Dim Product As String = nd.DataRow("主体名称")
    Dim P As String = nd.DataRow("负责人")
    Dim t As String = nd.DataRow("流程")
    Select Case nd.Level
        Case 0
            nd.Text = nd.text & "(" & dt.Compute("sum(件数)","流程 = \'" & t & "\'")  & "件)"
        Case 1
            
            nd.Text = nd.text & "年 (" & dt.Compute("sum(件数)", "流程 = \'"&t&"\' And "年 = "& Year) & "件)"
        Case 2
            nd.Text = nd.text & "|" & ""& p & ""
    End Select
Next
trv.Nodes.Insert("所有的行政许可","所有的行政许可(" & dt.Compute("sum(件数)") & "件)",0)


--  作者:dxjwlf
--  发布时间:2018/1/7 11:15:00
--  筛选统计中表达式写得不正确,求正解

[此贴子已经被作者于2018/1/7 11:15:40编辑过]

--  作者:有点甜
--  发布时间:2018/1/7 17:04:00
--  
Case 1
   
    nd.Text = nd.text & "年 (" & dt.Compute("sum(件数)", "流程 = \'" & t & "\' And 年 = " & Year) & "件)"