ReportingService2010.SetProperties(String, Property[]) 메서드

정의

지정된 항목의 속성을 하나 이상 설정합니다.

public:
 void SetProperties(System::String ^ ItemPath, cli::array <ReportService2010::Property ^> ^ Properties);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetProperties", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
public void SetProperties (string ItemPath, ReportService2010.Property[] Properties);
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetProperties", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)>]
[<System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")>]
[<System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)>]
member this.SetProperties : string * ReportService2010.Property[] -> unit
Public Sub SetProperties (ItemPath As String, Properties As Property())

매개 변수

ItemPath
String

파일 이름과 SharePoint 모드에서는 확장명을 포함하는 항목의 정규화된 URL입니다.

Properties
Property[]

항목에 대해 설정할 속성과 값을 정의하는 Property 개체의 배열입니다.

특성

예제

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

        try  
        {  
            rs.SetProperties(itemPath, props);  
            Console.WriteLine("New description set on item {0}.",   
                itemPath);  
        }  
        catch (SoapException ex)  
        {  
            Console.WriteLine(ex.Detail.OuterXml);  
        }  
    }  
}  
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/" + _  
            "ReportService2010.asmx"  
        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 = "http://<Server Name>/Docs/" + _  
            "Documents/AdventureWorks Sample Reports/" + _  
            "Sales Order Detail.rdl"  

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

        Catch ex As SoapException  
            Console.WriteLine(ex.Detail.OuterXml)  
        End Try  

    End Sub  

End Class  

설명

다음 표에서는 이 작업에 대한 헤더 및 사용 권한 정보를 보여 줍니다.

SOAP 헤더 사용 (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
기본 모드 필수 권한 항목 유형에 따라 다릅니다.

- Folder: UpdateProperties
- Report: UpdateProperties
- Resource: UpdateProperties
- DataSource: UpdateProperties
- Model: UpdateProperties
SharePoint 모드 필수 권한 <xref:Microsoft.SharePoint.SPBasePermissions.EditListItems>

개체를 메서드 인수로 전달 Property 하여 항목에 대한 새 사용자 정의 속성을 만들 수 있습니다. 항목에서 속성을 제거하려면 속성을 빈 값으로 설정합니다. 예약된 속성은 제거할 수 없습니다. 예약된 항목 속성 목록은 보고서 서버 항목 속성을 참조하세요.

메서드가 호출될 때 SetProperties 지정된 속성이 없으면 속성이 만들어지고 사용자가 제공하는 값으로 설정됩니다. 속성이 이미 있는 경우 해당 값을 덮어씁니다. 존재하지 않는 속성에 대해 빈 값을 설정해도 항목이나 해당 속성에는 영향을 주지 않습니다.

오류가 발생하면 속성이 설정되지 않습니다.

Item="/"이면 오류를 반환 rsOperationNotSupportedSharePointMode 합니다.

적용 대상