ReportingService2005.SetSystemProperties(Property[]) Method


设置一个或多个系统属性。Sets one or more system properties.

 void SetSystemProperties(cli::array <ReportService2005::Property ^> ^ Properties);
public void SetSystemProperties (ReportService2005.Property[] Properties);
member this.SetSystemProperties : ReportService2005.Property[] -> unit
Public Sub SetSystemProperties (Properties As Property())



Property 对象的数组,它定义要为报表服务器设置的系统属性和属性值。An array of Property objects that defines the system properties and values to set for a report server.


下表显示了有关此操作的标头和权限信息。The table below shows header and permissions information on this operation.

SOAP 标头SOAP Headers (Out) ServerInfoHeaderValue(Out) ServerInfoHeaderValue
所需的权限Required Permissions UpdateSystemProperties (系统) UpdateSystemProperties (System)

若要编译下面的代码示例,必须引用 Reporting Services WSDL 并导入某些命名空间。To compile the following code example, you must reference the Reporting Services WSDL and import certain namespaces. 有关详细信息,请参阅 编译和运行代码示例For more information, see Compiling and Running Code Examples. 下面的代码示例在 Report Server 数据库中创建名为 Description 的新系统属性:The following code example creates a new system property named Description in the report server database:

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  

         Console.WriteLine("New site property set.")  

      Catch ex As SoapException  
      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;  

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

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


用户可以添加系统不保留的其他自定义系统属性。Users can add additional custom system properties that are not reserved by the system. 如果数组中指定的属性 Property 不存在,则创建该属性。If a property specified in the Property array does not exist, it is created. 如果属性的值存在,则将覆盖该属性的值。If a value for a property exists, it is overwritten. 不能创建或删除保留的系统属性。You cannot create or remove reserved system properties. 根据要设置的系统属性,Report Server 的功能可能会改变。Depending on the system property being set, the functionality of the report server may change. 有关保留系统属性的列表,请参阅 报表服务器系统属性For a list of reserved system properties, see Report Server System Properties. 如果发生错误,则不设置任何属性。If errors occur, no properties are set.

可以通过将属性设置为空值来删除属性的值。You can remove the value of a property by setting the property to an empty value.

Applies to