ReportingService2010.SetProperties(String, Property[]) ReportingService2010.SetProperties(String, Property[]) ReportingService2010.SetProperties(String, Property[]) Method


Sets one or more properties of a specified item.

 void SetProperties(System::String ^ ItemPath, cli::array <ReportService2010::Property ^> ^ Properties);
[System.Web.Services.Protocols.SoapDocumentMethod("", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="", ResponseNamespace="", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
public void SetProperties (string ItemPath, ReportService2010.Property[] Properties);
Public Sub SetProperties (ItemPath As String, Properties As Property())
String String String

The fully qualified URL of the item including the file name and, in SharePoint mode, the extension.


An array of Property objects that defines the properties and values to set for the item.


using System;  
using System.Collections.Generic;  
using System.IO;  
using System.Text;  
using System.Web;  
using System.Web.Services;  
using System.Web.Services.Protocols;  

class Sample  
    static void Main(string[] args)  
        ReportingService2010 rs = new ReportingService2010();  
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" +  
        rs.Credentials =   

        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 = "http://<Server Name>/Docs/Documents/" +  
            "AdventureWorks Sample Reports/Sales Order Detail.rdl";  

            rs.SetProperties(itemPath, props);  
            Console.WriteLine("New description set on item {0}.",   
        catch (SoapException ex)  
Imports System  
Imports System.IO  
Imports System.Text  
Imports System.Web.Services  
Imports System.Web.Services.Protocols  

Class Sample  

    Public Shared Sub Main()  

        Dim rs As New ReportingService2010()  
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" + _  
        rs.Credentials = _  

        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 = "http://<Server Name>/Docs/" + _  
            "Documents/AdventureWorks Sample Reports/" + _  
            "Sales Order Detail.rdl"  

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

        Catch ex As SoapException  
        End Try  

    End Sub  

End Class  


The table below shows header and permissions information on this operation.

SOAP Header Usage (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
Native Mode Required Permissions Depends on the item type:

- Folder: UpdateProperties
- Report: UpdateProperties
- Resource: UpdateProperties
- DataSource: UpdateProperties
- Model: UpdateProperties
SharePoint Mode Required Permissions <xref:Microsoft.SharePoint.SPBasePermissions.EditListItems>

You can create new user-defined properties for an item by passing a Property 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 that you supply. If the property already exists, its value is overwritten. Setting an empty value for a property that does not exist does not affect the item or its properties.

If an error occurs, no properties are set.

Returns rsOperationNotSupportedSharePointMode error when Item=”/”.

Applies to