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)