次の方法で共有


ReportingService2005.SetSystemProperties メソッド

1 つ以上のシステム プロパティを設定します。

名前空間:  ReportService2005
アセンブリ:  ReportService2005 (ReportService2005.dll)

構文

'宣言
Public Sub SetSystemProperties ( _
    Properties As Property() _
)
'使用
Dim instance As ReportingService2005 
Dim Properties As Property()

instance.SetSystemProperties(Properties)
public void SetSystemProperties(
    Property[] Properties
)
public:
void SetSystemProperties(
    array<Property^>^ Properties
)
member SetSystemProperties : 
        Properties:Property[] -> unit
public function SetSystemProperties(
    Properties : Property[]
)

パラメーター

  • Properties
    型: array<ReportService2005.Property[]
    レポート サーバーに設定するシステム プロパティと値を定義する Property オブジェクトの配列です。

説明

ユーザーは、システムで予約されていないカスタム システム プロパティを追加することができます。 Property 配列に指定したプロパティが存在しない場合は、そのプロパティが作成されます。 プロパティに値が存在する場合は上書きされます。 予約済みのシステム プロパティを作成または削除することはできません。 設定するシステム プロパティによっては、レポート サーバーの機能が変更される可能性があります。 予約済みのシステム プロパティの一覧については、「レポート サーバーのシステム プロパティ」を参照してください。 エラーが発生すると、プロパティは設定されません。

プロパティに空の値を設定することにより、プロパティの値を削除することができます。

使用例

次の表に、この操作に関連するヘッダーおよび権限の情報を示します。

SOAP ヘッダー

(Out) ServerInfoHeaderValue

必要な権限

UpdateSystemProperties (システム)

次のコード例をコンパイルするには、Reporting Services の WSDL を参照し、特定の名前空間をインポートする必要があります。 詳細については、「Compiling and Running Code Examples」を参照してください。 次のコード例では、レポート サーバー データベースに Description という名前の新しいシステム プロパティを作成します。

Imports System
Imports System.Web.Services.Protocols

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

      Dim setProp As New [Property]()
      setProp.Name = "Description"
      setProp.Value = "My report server that resides on the computer named RSSERVER1."
      Dim props(0) As [Property]
      props(0) = setProp

      Try
         rs.SetSystemProperties(props)
         Console.WriteLine("New site property set.")

      Catch ex As SoapException
         Console.WriteLine(ex.Detail.OuterXml)
      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;

      Property setProp = new Property();
      setProp.Name = "Description";
      setProp.Value = "My report server that resides on the computer named RSSERVER1.";
      Property[] props = new Property[1];
      props[0] = setProp;

      try
      {
         rs.SetSystemProperties( props );
         Console.WriteLine( "New site property set." );
      }

      catch (SoapException ex)
      {
         Console.WriteLine( ex.Detail.OuterXml);
      }
   }
}

関連項目

参照

ReportingService2005 クラス

ReportService2005 名前空間