ReportingService2010.SetItemHistoryLimit(String, Boolean, Int32) ReportingService2010.SetItemHistoryLimit(String, Boolean, Int32) ReportingService2010.SetItemHistoryLimit(String, Boolean, Int32) Method


指定报表服务器保留的项的快照数。 Specifies the number of snapshots of an item that the report server retains. 此方法适用于Report项目类型。 This method applies to the Report item type.

 void SetItemHistoryLimit(System::String ^ ItemPath, bool UseSystem, int HistoryLimit);
[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 SetItemHistoryLimit (string ItemPath, bool UseSystem, int HistoryLimit);
Public Sub SetItemHistoryLimit (ItemPath As String, UseSystem As Boolean, HistoryLimit As Integer)
String String String

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

Boolean Boolean Boolean

一个Boolean表达式,在该表达式设置为 true 时,将项历史记录限制值设置为当前系统项历史记录限制值。 A Boolean expression that, when set to true, sets the item history limit to the current system item history limit. 值为false指示的中提供的值相对应的项的历史记录限制HistoryLimit参数。 A value of false indicates that the item history limit corresponds to the value supplied in the HistoryLimit parameter.

Int32 Int32 Int32

为项存储的项历史记录快照的数目。 The number of item history snapshots to store for the item. 值介于 -12,147,483,647 之间。 Values can range from -1 to 2,147,483,647. 如果值设置为–1,保存所有项快照。 If the value is set to –1, all item snapshots are saved.


下表显示了有关此操作的标头和权限信息。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 UpdatePolicy
SharePoint 模式所需的权限SharePoint Mode Required Permissions EditListItems

此方法仅支持Report项目类型。This method only supports the Report item type. 指定报表以外的任何项的 URL 会导致引发异常,同时"错误项类型"中的异常字符串的方法。Specifying the URL of any item other than a report causes the method to throw an exception with the exception string "Wrong Item Type".

如果UseSystem参数设置为true,报表服务器将忽略HistoryLimit参数。If the UseSystem parameter is set to true, the report server ignores the HistoryLimit parameter.


如果值HistoryLimit已更改,项历史记录快照可能会被删除。If the value of HistoryLimit is changed, item history snapshots may be deleted.