ReportingService2005.SetProperties Method
Sets one or more properties of a specified item.
命名空间: Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005
程序集: ReportService2005 (in reportingservice2005.dll)
语法
声明
<SoapHeaderAttribute("BatchHeaderValue")> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction:=SoapHeaderDirection.Out)> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/SetProperties", RequestNamespace:="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace:="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Sub SetProperties ( _
Item As String, _
Properties As Property() _
)
[SoapHeaderAttribute("BatchHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out)]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/SetProperties", RequestNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
public void SetProperties (
string Item,
Property[] Properties
)
[SoapHeaderAttribute(L"BatchHeaderValue")]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction=SoapHeaderDirection::Out)]
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/SetProperties", RequestNamespace=L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace=L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse::Literal, ParameterStyle=SoapParameterStyle::Wrapped)]
public:
void SetProperties (
String^ Item,
array<Property^>^ Properties
)
/** @attribute SoapHeaderAttribute("BatchHeaderValue") */
/** @attribute SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out) */
/** @attribute SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/SetProperties", RequestNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped) */
public void SetProperties (
String Item,
Property[] Properties
)
SoapHeaderAttribute("BatchHeaderValue")
SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out)
SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/SetProperties", RequestNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)
public function SetProperties (
Item : String,
Properties : Property[]
)
参数
- Item
The full path name of the item.
- Properties
An array of Property objects that defines the properties and values to set for the item.
备注
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 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 编译和运行代码示例. 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 ReportingService2005()
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"
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 '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[] 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";
try
{
rs.SetProperties(itemPath, props);
Console.WriteLine("New description set on item {0}.", itemPath);
}
catch (SoapException ex)
{
Console.WriteLine(ex.Detail.OuterXml);
}
}
}
线程安全
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
平台
开发平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
目标平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
请参阅
参考
ReportingService2005 Class
ReportingService2005 Members
Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005 Namespace