|
-
Mar 30th, 2006, 07:56 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Populate Reporting Services Treeview
Hi all,
I'm trying to populate a treeview control in my asp.net environment from reports in sql server reporting services.
I almost have it done... With the code I am using I am getting it to populate, but every node is at top level, I can't get it to add the child nodes.
What could be wrong?
This is my code thusfar:
VB Code:
Protected Sub LoadTree(ByVal items As NetcashReportService.CatalogItem())
rs.Credentials = nc
TreeReports.Nodes.Clear()
For Each item As NetcashReportService.CatalogItem In items
Dim parts As String() = item.Path.Split("/".ToCharArray)
Dim path As String = ""
Dim lastNode As TreeNode = Nothing
Dim lastPart As String = ""
For Each t As String In parts
lastPart = t
If Not (path = "") Then
path += "/"
End If
path += t
Dim tn As TreeNode = TreeReports.FindNode(path)
lastNode = tn
Next
Dim newNode As TreeNode = New TreeNode(lastPart)
If lastNode Is Nothing Then
TreeReports.Nodes.Add(newNode)
Else
lastNode.ChildNodes.Add(newNode)
End If
Next
SetTreeLinks(TreeReports.Nodes)
'TreeReports.ExpandDepth = 1
End Sub
-
Apr 28th, 2006, 02:39 AM
#2
Thread Starter
Addicted Member
Re: Populate Reporting Services Treeview
hi all,
thanks, this post has been answered by another forum
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|