ListChildren 메서드
지정된 폴더의 자식 목록을 가져옵니다.
네임스페이스: ReportService2010
어셈블리: ReportService2010(ReportService2010.dll)
구문
‘선언
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/ListChildren", RequestNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
ResponseNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function ListChildren ( _
ItemPath As String, _
Recursive As Boolean _
) As CatalogItem()
‘사용 방법
Dim instance As ReportingService2010
Dim ItemPath As String
Dim Recursive As Boolean
Dim returnValue As CatalogItem()
returnValue = instance.ListChildren(ItemPath, _
Recursive)
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/ListChildren", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public CatalogItem[] ListChildren(
string ItemPath,
bool Recursive
)
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/ListChildren", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
public:
array<CatalogItem^>^ ListChildren(
String^ ItemPath,
bool Recursive
)
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/ListChildren", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
member ListChildren :
ItemPath:string *
Recursive:bool -> CatalogItem[]
public function ListChildren(
ItemPath : String,
Recursive : boolean
) : CatalogItem[]
매개 변수
- ItemPath
유형: System. . :: . .String
부모 폴더의 전체 경로 이름입니다.
- Recursive
유형: System. . :: . .Boolean
자식 항목의 전체 트리를 지정된 항목 아래에 반환할지 여부를 나타내는 Boolean 식입니다. 기본값은 false입니다.
참고 SharePoint 모드에서 이 매개 변수를 true로 설정하면 응용 프로그램의 성능이 상당히 줄어들 수 있습니다.
반환 값
유형: array<ReportService2010. . :: . .CatalogItem> [] () [] []
CatalogItem 개체의 배열입니다. 자식이 없으면 이 메서드는 비어 있는 배열을 반환합니다.
주의
The table below shows header and permissions information on this operation.
SOAP Header Usage |
(Out) ServerInfoHeaderValue |
Native Mode Required Permissions |
ReadProperties on Item |
SharePoint Mode Required Permissions |
ViewListItems()()()() |
This method returns only child items that the user has permission to view. The items that are returned may not represent a complete list of child items of the specified parent item.
If this method is called on the root of the report server database with My Reports enabled, the method returns an array of CatalogItem objects containing properties for the folder My Reports. If the user is anonymous and My Reports is enabled, the properties for My Reports are not returned when this method is called on the root.
This method can return the VirtualPath property of items in the report server database that support virtual paths. The virtual path is the path under which a user expects to see the item. For example, a report called "Report1" located in the user's personal My Reports folder has a virtual path equal to "/My Reports". The actual path of the item is /Users/Username/My Reports.
The majority of the properties this method returns are read-only. For more information about item properties in Reporting Services, see 보고서 서버 항목 속성.
예
To compile the following code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see Compiling and Running Code Examples. The following code example uses the ListChildren method to read the contents of the root of the report server directory tree, and then stores the first item and its properties as an XML document:
Imports System
Imports System.IO
Imports System.Text
Imports System.Web.Services.Protocols
Imports System.Xml
Imports System.Xml.Serialization
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2010()
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("/", True)
Catch e As SoapException
Console.WriteLine(e.Detail.InnerXml.ToString())
End Try
' Serialize the contents as an XML document and write the contents to a file.
Try
Dim fs As New FileStream("CatalogItems.xml", FileMode.Create)
Dim writer As New XmlTextWriter(fs, Encoding.Unicode)
Dim serializer As New XmlSerializer(GetType(CatalogItem()))
serializer.Serialize(writer, items)
Console.WriteLine("Server contents successfully written to a file.")
Catch e As Exception
Console.WriteLine(e.Message)
End Try
End Sub 'Main
End Class 'Sample
using System;
using System.IO;
using System.Text;
using System.Web.Services.Protocols;
using System.Xml;
using System.Xml.Serialization;
class Sample
{
public static void Main()
{
ReportingService2010 rs = new ReportingService2010();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
CatalogItem[] items = null;
// Retrieve a list of all items from the report server database.
try
{
items = rs.ListChildren("/", true);
}
catch (SoapException e)
{
Console.WriteLine(e.Detail.OuterXml);
}
// Serialize the contents as an XML document and write the contents to a file.
try
{
FileStream fs = new FileStream("CatalogItems.xml", FileMode.Create);
XmlTextWriter writer = new XmlTextWriter(fs, Encoding.Unicode);
XmlSerializer serializer = new XmlSerializer(typeof(CatalogItem[]));
serializer.Serialize(writer, items);
Console.WriteLine("Server contents successfully written to a file.");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}