ReportingService2005.GetProperties(String, Property[]) 메서드

정의

보고서 서버 데이터베이스의 항목에 대한 하나 이상의 속성 값을 반환합니다.

public:
 cli::array <ReportService2005::Property ^> ^ GetProperties(System::String ^ Item, cli::array <ReportService2005::Property ^> ^ Properties);
public ReportService2005.Property[] GetProperties (string Item, ReportService2005.Property[] Properties);
member this.GetProperties : string * ReportService2005.Property[] -> ReportService2005.Property[]
Public Function GetProperties (Item As String, Properties As Property()) As Property()

매개 변수

Item
String

항목의 전체 경로 이름 또는 ID입니다.

Properties
Property[]

값을 검색할 속성을 포함하는 Property 개체의 배열입니다.

반환

지정한 항목의 속성을 나타내는 Property 개체의 배열입니다.

예제

이 코드 예제를 컴파일하려면 Reporting Services WSDL을 참조하고 특정 네임스페이스를 가져와야 합니다. 자세한 내용은 코드 예제 컴파일 및 실행을 참조하세요. 다음 코드 예제에서는 메서드를 GetProperties 사용하여 회사 판매 보고서와 연결된 설명을 검색합니다.

Imports System  
Imports System.Web.Services.Protocols  

Class Sample  
   Public Shared Sub Main()  
      Dim rs As New ReportingService2005()  
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials  

      ' Create the property to retrieve.  
      Dim retrieveProp As New [Property]()  
      retrieveProp.Name = "Description"  
      Dim props(0) As [Property]  
      props(0) = retrieveProp  

      Try  
         Dim properties As [Property]() = rs.GetProperties("/SampleReports/Company Sales", props)  

         Dim prop As [Property]  
         For Each prop In  properties  
            ' Writes the description to the console.  
            Console.WriteLine(prop.Value)  
         Next prop  

      Catch e As SoapException  
         Console.WriteLine(e.Detail.InnerXml.ToString())  
      End Try  
   End Sub 'Main  
End Class 'Sample  
using System;  
using System.Web.Services.Protocols;  

class Sample  
{  
   public static void Main()  
   {  
      ReportingService2005 rs = new ReportingService2005();  
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;  

      // Create the property to retrieve.  
      Property retrieveProp = new Property();  
      retrieveProp.Name = "Description";  
      Property[] props = new Property[1];  
      props[0] = retrieveProp;  

      try  
      {  
         Property[] properties = rs.GetProperties("/SampleReports/Company Sales", props);  

         foreach (Property prop in properties)  
         {  
            // Writes the description to the console.  
            Console.WriteLine(prop.Value);  
         }  
      }  

      catch ( SoapException e )  
      {  
         Console.WriteLine( e.Detail.InnerXml.ToString() );  
      }  
   }  
}  

설명

다음 표에서는 이 작업에 대한 헤더 및 사용 권한 정보를 보여 줍니다.

SOAP 헤더 (In) ItemNamespaceHeaderValue

(Out) ServerInfoHeaderValue
필요한 권한 항목 유형에 따라 다릅니다.

- Folder: ReadProperties
- Report: ReadProperties
- Resource: ReadProperties
- DataSource: ReadProperties
- Model: ReadProperties

이 인수에 대해 전달해야 하는 기본값은 전체 경로 이름입니다. ID를 제공하려면 SOAP 헤더를 ItemNamespaceHeader 설정해야 합니다. 자세한 내용은 GetProperties 메서드에 대한 항목 네임스페이스 설정을 참조하세요.

메서드를 GetProperties 사용하여 사용자 정의 및 예약 속성의 전체 집합을 검색합니다. 예약 속성의 표준 하위 집합을 검색하려면 메서드를 ListChildren 사용합니다. 보고서 서버 데이터베이스에 있는 항목의 예약된 속성 목록은 보고서 서버 항목 속성을 참조하세요.

매개 변수가 Propertiesnull (Nothing Visual Basic의 경우)이면 지정된 항목에 대한 모든 속성이 반환됩니다. 여기에는 항목과 관련된 모든 사용자 정의 및 기본 제공 속성이 포함됩니다.

매개 변수에 대한 Item 항목의 전체 경로 이름을 전달하거나 항목의 ID를 전달할 수 있습니다. SOAP 헤더를 사용하여 이 작업을 수행하는 방법에 대한 자세한 내용은 Reporting Services SOAP 헤더 사용을 참조하세요.

적용 대상