SetProperties Method
Collapse the table of content
Expand the table of content

SetProperties Method

SQL Server 2000

ReportingService.SetProperties Method

Sets one or more properties of a specified item.

Public Sub SetProperties( _
   ByVal Item As String _
   ByVal Properties() As [Namespace].Property _
   Member of [Namespace].ReportingService

public void SetProperties(
   string Item,
   [Namespace].Property[] Properties
   Member of [Namespace].ReportingService
The full path name of the item.
An array of Property[] objects that defines the properties and values to set for the item.

Operation Description
Update Properties Required for updating item properties and associated meta data.


You can create new user-defined properties for an item by passing a Properties object as a method argument. To remove a property from an item, set the property to an empty value. You cannot remove reserved properties. For a list of reserved item properties, see Report Server Item Properties.

If a specified property does not exist when the SetProperties method is called, the property is created and set to the value you supply. If the property already exists, its value is overwritten. Setting an empty value for a property that does not exist has no effect on the item or its properties.

If an error occurs, no properties are set.


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. The following code example sets a new description for the Company Sales report:

Imports System
Imports System.Web.Services.Protocols

Class Sample
   Public Shared Sub Main()
      Dim rs As New ReportingService()
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials
      Dim props(0) As [Property]
      Dim setProp As New [Property]()
      setProp.Name = "Description"
      setProp.Value = "Sales by quarter and product category."
      props(0) = setProp
      Dim itemPath As String = "/SampleReports/Company Sales"
         rs.SetProperties(itemPath, props)
         Console.WriteLine("New description set on item {0}.", itemPath)
      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()
      RSWebService rs = new RSWebService();
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
      Property[] props = new Property[1];
      Property setProp = new Property();
      setProp.Name = "Description";
      setProp.Value = "Sales by quarter and product category.";
      props[0] = setProp;

      string itemPath = "/SampleReports/Company Sales"; 

         rs.SetProperties(itemPath, props);
         Console.WriteLine("New description set on item {0}.", itemPath);

      catch (SoapException ex)
See Also

ReportingService Class

Reporting Services Web Service Library

© 2015 Microsoft