ReportingService2010.SetItemDefinition(String, Byte[], Property[]) ReportingService2010.SetItemDefinition(String, Byte[], Property[]) ReportingService2010.SetItemDefinition(String, Byte[], Property[]) Method

定义

设置指定项的定义或内容。 Sets the definition or content for a specified item. 此方法适用于ReportModelDatasetComponentResource,和DataSource项类型。 This method applies to the Report, Model, Dataset, Component, Resource, and DataSource item types.

public:
 cli::array <ReportService2010::Warning ^> ^ SetItemDefinition(System::String ^ ItemPath, cli::array <System::Byte> ^ Definition, cli::array <ReportService2010::Property ^> ^ Properties);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetItemDefinition", 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 ReportService2010.Warning[] SetItemDefinition (string ItemPath, byte[] Definition, ReportService2010.Property[] Properties);
Public Function SetItemDefinition (ItemPath As String, Definition As Byte(), Properties As Property()) As Warning()
参数
ItemPath
String String String

项的完全限定 URL,其中包括文件名(在 SharePoint 模式下,还有扩展名)。 The fully qualified URL of the item including the file name and, in SharePoint mode, the extension.

Definition
Byte[]

要注册的项定义。 The item definition to register.

Properties
Property[]

数组Property定义属性和值的项设置的对象。 An array of Property objects that defines the properties and values to set for the item.

返回

一个 Warning 对象的数组,该数组说明在验证项定义或内容时出现的警告。 An array of Warning objects that describes the warnings that occurred when the item definition or content was being validated.

注解

下表显示了有关此操作的标头和权限信息。The table below shows header and permissions information on this operation.

SOAP 标头使用情况SOAP Header Usage (In) TrustedUserHeaderValue(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue(Out) ServerInfoHeaderValue
纯模式所需的权限Native Mode Required Permissions 取决于项目类型:Depends on the item type:

- Report, DataSet: UpdateReportDefinition- Report, DataSet: UpdateReportDefinition
- Resource, Component: UpdateContent- Resource, Component: UpdateContent
- DataSource: UpdateContent- DataSource: UpdateContent
- Model: UpdateContent- Model: UpdateContent
SharePoint 模式所需的权限SharePoint Mode Required Permissions EditListItems

长度ItemPath参数不能超过 260 个字符; 否则,将 SOAP 异常引发,错误代码rsItemLengthExceededThe length of the ItemPath parameter cannot exceed 260 characters; otherwise, a SOAP exception is thrown with the error code rsItemLengthExceeded.

ItemPath参数不能为 null 或为空或包含下列保留的字符: : ? ; @ & = + $ , \ * > < | . "The ItemPath parameter cannot be null or empty or contain the following reserved characters: : ? ; @ & = + $ , \ * > < | . ". 你可以使用正斜杠字符 (/) 分隔的文件夹的完整路径名称中的项,但不能在文件夹名称末尾使用它。You can use the forward slash character (/) to separate items in the full path name of the folder, but you cannot use it at the end of the folder name.

如果ItemTypeReport,然后通过定义的 XML 数据报表定义语言If ItemType is Report, then the XML data is defined by the Report Definition Language. 如果ItemTypeModel,然后通过定义的 XML 数据语义模型定义语言If ItemType is Model, then the XML data is defined by the Semantic Model Definition Language.

更改的定义或内容项修改ModifiedByModifiedDate,和Size的项目属性。Changing the definition or content for an item modifies the ModifiedBy, ModifiedDate, and Size properties of the item. Description属性不受影响。The Description property is not affected. 执行设置和现有快照保持不变的项。Execution settings and existing snapshots remain unchanged for the item.

适用于