Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Gets a list of children from a specified folder.
Namespace: ReportService2006
Assembly: ReportService2006 (in ReportService2006.dll)
Syntax
'Declaration
Public Function ListChildren ( _
Item As String _
) As CatalogItem()
'Usage
Dim instance As ReportingService2006
Dim Item As String
Dim returnValue As CatalogItem()
returnValue = instance.ListChildren(Item)
public CatalogItem[] ListChildren(
string Item
)
public:
array<CatalogItem^>^ ListChildren(
String^ Item
)
member ListChildren :
Item:string -> CatalogItem[]
public function ListChildren(
Item : String
) : CatalogItem[]
Parameters
- Item
Type: System.String
The fully qualified URL for the folder.
Return Value
Type: array<ReportService2006.CatalogItem[]
An array of CatalogItem objects. If no children exist, this method returns an empty CatalogItem array.
Remarks
The table below shows header and permissions information on this operation.
SOAP Headers |
(Out) ServerInfoHeaderValue |
Required Permissions |
This method returns all the children of Item to which the user has ViewListItems permission.
Calling ListChildren on the catalog root, “/”, returns the top level list of sites.
Examples
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
class Sample
{
static void Main(string[] args)
{
ReportingService2006 rs = new ReportingService2006();
rs.Url = "http://<Server Name>/_vti_bin/ReportServer" +
"/ReportService2006.asmx";
rs.Credentials =
System.Net.CredentialCache.DefaultCredentials;
CatalogItem[] items = null;
try
{
items = rs.ListChildren("/");
foreach (CatalogItem item in items)
{
Console.WriteLine("Name: " + item.Name);
Console.WriteLine("Path: " + item.Path);
Console.WriteLine("Type: " + item.Type.ToString());
}
}
catch (SoapException e)
{
Console.WriteLine(e.Detail.OuterXml);
}
}
}
Imports System
Imports System.IO
Imports System.Text
Imports System.Web.Services
Imports System.Web.Services.Protocols
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2006()
rs.Url = "http://<Server Name>/_vti_bin/ReportServer" + _
"/ReportService2006.asmx"
rs.Credentials = _
System.Net.CredentialCache.DefaultCredentials
Dim items As CatalogItem() = Nothing
' Retrieve a list of all items
' from the report server database.
Try
items = rs.ListChildren("/")
If Not (items Is Nothing) Then
For Each item As CatalogItem In items
Console.WriteLine("Name: " + item.Name)
Console.WriteLine("Path: " + item.Path)
Console.WriteLine("Type: " + _
item.Type.ToString())
Next
End If
Catch e As SoapException
Console.WriteLine(e.Detail.InnerXml.ToString())
End Try
End Sub
End Class