这个是按照不同工序分别打开各自工序的报表
If e.Node.Level = 1 Then
Dim ps() As String = e.Node.FullPath.Split("\")
Dim dr As DataRow = DataTables("部门工段清单").Find("部门 = '" & ps(0) & "' And 工序 = '" & ps(1) & "'")
If dr IsNot Nothing And dr("负责人")=_UserName Or _UserIsRole = "管理员" Then
rb=dr("工序")
Select dr("部门")
Case "一工段","二工段","三工段","四工段","五工段","六工段","干压线","动作杆线"
Forms("日报表").show()
DataTables("日报表").loadFilter = "工序= '" & dr("工序") & "'and 生产数 Is Null"
DataTables("日报表").load
With Tables("日报表")
.Position = .Rows.Count - 1
End With
End Select
End If
End If