Aracılığıyla paylaş


ReportingService2010.SetProperties Yöntemi

Belirtilen öğe, bir veya daha fazla özelliklerini ayarlar.

Ad Alanı:  ReportService2010
Derleme:  ReportService2010 (ReportService2010 içinde.dll)

Sözdizimi

'Bildirim
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetProperties", RequestNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",  _
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub SetProperties ( _
    ItemPath As String, _
    Properties As Property() _
)
'Kullanım
Dim instance As ReportingService2010
Dim ItemPath As String
Dim Properties As Property()

instance.SetProperties(ItemPath, Properties)
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetProperties", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void SetProperties(
    string ItemPath,
    Property[] Properties
)
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetProperties", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
public:
void SetProperties(
    String^ ItemPath, 
    array<Property^>^ Properties
)
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetProperties", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
member SetProperties : 
        ItemPath:string * 
        Properties:Property[] -> unit 
public function SetProperties(
    ItemPath : String, 
    Properties : Property[]
)

Parametreler

  • ItemPath
    Tür: System.String
    Dosya adı da dahil olmak üzere öğe ve SharePoint modunda, uzantının tam url.

Açıklamalar

Aşağıdaki tablo üstbilgi ve izinler bu işlemi gösterir.

soap üstbilgisi kullanımı

(De)TrustedUserHeaderValue

(Giden)ServerInfoHeaderValue

Yerel mod gerekli izinleri

Öğe türüne bağlıdır:

SharePoint modu gerekli izinleri

EditListItems()

Geçirerek, yeni bir öğe için kullanıcı tanımlı özellikler oluşturabilirsiniz bir Property nesnesi olarak bir yöntem bağımsız değişkeni.öğe, bir özellik kaldırmak için küme için boş bir değer özellik.Ayrılmış özellikleri kaldıramazsınız.Ayrılmış öğe özelliklerinin listesi için bkz: Rapor sunucusu madde özellikleri.

Belirtilen özellik yoksa, SetProperties yöntem çağrılır, özellik oluşturulur ve küme değer o, tedarik.Özellik zaten varsa, değeri yazılır.öğe veya özellikleri var olmayan bir özellik için boş bir değer ayarını etkilemez.

Bir hata oluşursa, hiçbir özellikleri küme.

Döndürür rsOperationNotSupportedSharePointMode hatası maddenin = "/".

Örnekler

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