ReportingService2010.SetItemHistoryLimit(String, Boolean, Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定报表服务器保留的项的快照数。 此方法适用于Report
项类型。
public:
void SetItemHistoryLimit(System::String ^ ItemPath, bool UseSystem, int HistoryLimit);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetItemHistoryLimit", 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 SetItemHistoryLimit(string ItemPath, bool UseSystem, int HistoryLimit);
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetItemHistoryLimit", 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.SetItemHistoryLimit : string * bool * int -> unit
Public Sub SetItemHistoryLimit (ItemPath As String, UseSystem As Boolean, HistoryLimit As Integer)
参数
- ItemPath
- String
项的完全限定 URL,其中包括文件名(在 SharePoint 模式下,还有扩展名)。
- UseSystem
- Boolean
一个Boolean
表达式,在该表达式设置为 true
时,将项历史记录限制值设置为当前系统项历史记录限制值。 值 指示 false
项历史记录限制对应于 参数中 HistoryLimit
提供的值。
- HistoryLimit
- Int32
为项存储的项历史记录快照的数目。 值介于 -1
到 2,147,483,647
之间。 如果将此值设置为 –1
,则保存所有项快照。
- 属性
注解
下表显示了有关此操作的标头和权限信息。
SOAP 标头用法 | (In) TrustedUserHeaderValue (Out) ServerInfoHeaderValue |
本机模式所需的权限 | UpdatePolicy |
SharePoint 模式所需权限 | <xref:Microsoft.SharePoint.SPBasePermissions.EditListItems> |
此方法仅支持 Report
项类型。 指定报表以外的任何项的 URL 会导致方法引发异常字符串“错误的项类型”的异常。
如果 参数 UseSystem
设置为 true
,则报表服务器将 HistoryLimit
忽略 参数。
注意
如果 的值 HistoryLimit
发生更改,可能会删除项历史记录快照。