ReportingService2005.GetProperties(String, Property[]) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
レポート サーバー データベースのアイテムの 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 です。
戻り値
指定した項目の Property プロパティを表す オブジェクトの配列。
例
このコード例をコンパイルするには、Reporting Services の WSDL を参照し、特定の名前空間をインポートする必要があります。 詳細については、「 コード例のコンパイルと実行」を参照してください。 次のコード例では、GetProperties メソッドを使用して、Company Sales レポートに関連付けられた説明を取得します。
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 を指定するには、ItemNamespaceHeader SOAP ヘッダーを設定する必要があります。 詳細については、「 GetProperties メソッドの項目名前空間の設定」を参照してください。
ユーザー定義プロパティと予約済みプロパティをすべて取得するには、GetProperties メソッドを使用します。 予約済みプロパティの標準サブセットを取得するには、ListChildren メソッドを使用します。 レポート サーバー データベース内のアイテムの予約プロパティの一覧については、「 レポート サーバー アイテムのプロパティ」を参照してください。
Properties
パラメーターが null
(Visual Basic では Nothing
) の場合、指定したアイテムのすべてのプロパティが返されます。 これには、アイテムに固有のユーザー定義のプロパティと組み込みのプロパティがすべて含まれます。
Item
パラメーターには、アイテムの完全なパス名か、アイテムの ID を渡すことができます。 SOAP ヘッダーを使用してこれを実現する方法の詳細については、「Reporting Services SOAP ヘッダーの使用」を参照してください。