修改代码
Dim dr As DataRow = e.Node.DataRow '获取生成此节点的行
Dim Filter As String
e.Form.StopRedraw
If e.node.text <> "显示所有行" Then
Dim Year As Integer = dr("年")
Dim Month As Integer = dr("月")
Dim Product As String = dr("驾驶员")
Select Case e.Node.Level
Case 0
Filter ="驾驶员= '" & Product & "'"
Case 1
Filter ="Year(出车时间) = " & Year & " And 驾驶员 = '" & Product & "'"
Case 2
Filter ="Year(出车时间) = " & Year & " And Month(出车时间) = " & Month & " And 驾驶员 = '" & Product & "'"
End Select
Else
Filter = ""
End If
DataTables("派车表").LoadFilter = Filter
DataTables("派车表").Load()
e.Form.ResumeRedraw