ReportingService2005.GetProperties 메서드

Returns the value of one or more properties of an item in the report server database.

네임스페이스:  ReportService2005
어셈블리:  ReportService2005(ReportService2005.dll)

구문

‘선언
Public Function GetProperties ( _
    Item As String, _
    Properties As Property() _
) As Property()
‘사용 방법
Dim instance As ReportingService2005 
Dim Item As String 
Dim Properties As Property()
Dim returnValue As Property()

returnValue = instance.GetProperties(Item, _
    Properties)
public Property[] GetProperties(
    string Item,
    Property[] Properties
)
public:
array<Property^>^ GetProperties(
    String^ Item, 
    array<Property^>^ Properties
)
member GetProperties : 
        Item:string * 
        Properties:Property[] -> Property[] 
public function GetProperties(
    Item : String, 
    Properties : Property[]
) : Property[]

매개 변수

  • Item
    유형: System.String
    The full path name or the ID of the item.

반환 값

유형: array<ReportService2005.Property[]
An array of Property objects that represents the properties of the specified item.

주의

The table below shows header and permissions information on this operation.

SOAP Headers

(In) ItemNamespaceHeaderValue

(Out) ServerInfoHeaderValue

Required Permissions

Depends on the item type:

The default value that must be passed for this argument is the full path name. To supply an ID, you must set the ItemNamespaceHeader SOAP header. For more information, see GetProperties 메서드에 대한 항목 네임스페이스 설정.

Use the GetProperties method to retrieve the complete set of user-defined and reserved properties. To retrieve the standard subset of reserved properties, use the ListChildren method. For a list of the reserved properties of items in the report server database, see 보고서 서버 항목 속성.

If the Properties parameter is nullnull 참조(Visual Basic에서는 Nothing) (Nothing in Visual Basic), all properties for the specified item are returned. These include all user-defined and built-in properties that are specific to the item.

You can pass the full path name of the item for the Item parameter or you can pass the ID of the item. For more information about using SOAP headers to accomplish this, see Reporting Services SOAP 헤더 사용.

To compile this 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 GetProperties method to retrieve the description associated with the Company Sales report:

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() );
      }
   }
}

참고 항목

참조

ReportingService2005 클래스

ReportService2005 네임스페이스