Language

ReportingService2005.GetProperties(String, Property[]) メソッド

定義

レポートサーバーデータベース内のアイテムの1つ以上のプロパティの値を返します。

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ヘッダー (イン) ItemNamespaceHeaderValue

(アウト) ServerInfoHeaderValue
必要なアクセス許可 アイテムの種類によります:

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

この引数で渡すべきデフォルト値は、パス名のフルです。 IDを提供するには、 ItemNamespaceHeader SOAPヘッダーを設定する必要があります。 詳細については、 GetPropertiesメソッドの「Setting the Item Namespace」をご覧ください。

GetPropertiesメソッドを使って、ユーザー定義および予約済みプロパティの全セットを取得します。 予約された性質の標準部分集合を取得するには、 ListChildren メソッドを用います。 レポートサーバーデータベース内の項目の予約プロパティ一覧については 、「レポートサーバーアイテムプロパティ」をご覧ください。

Propertiesパラメータがnull(Visual BasicでNothing)であれば、指定されたアイテムのすべてのプロパティが返されます。 これには、アイテム固有のユーザー定義および組み込みプロパティが含まれます。

Itemパラメータに対してアイテムの完全なパス名を渡すか、アイテムのIDを渡すこともできます。 SOAPヘッダーの使用についての詳細は、「Using Reporting Services SOAP Headers」をご覧ください。

適用対象