Share via


ReportingService2010.SetItemHistoryLimit(String, Boolean, Int32) Method

Definition

Specifies the number of snapshots of an item that the report server retains. This method applies to the Report item type.

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)

Parameters

ItemPath
String

The fully qualified URL of the item including the file name and, in SharePoint mode, the extension.

UseSystem
Boolean

A Boolean expression that, when set to true, sets the item history limit to the current system item history limit. A value of false indicates that the item history limit corresponds to the value supplied in the HistoryLimit parameter.

HistoryLimit
Int32

The number of item history snapshots to store for the item. Values can range from -1 to 2,147,483,647. If the value is set to –1, all item snapshots are saved.

Attributes

Remarks

The table below shows header and permissions information on this operation.

SOAP Header Usage (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
Native Mode Required Permissions UpdatePolicy
SharePoint Mode Required Permissions <xref:Microsoft.SharePoint.SPBasePermissions.EditListItems>

This method only supports the Report item type. Specifying the URL of any item other than a report causes the method to throw an exception with the exception string "Wrong Item Type".

If the UseSystem parameter is set to true, the report server ignores the HistoryLimit parameter.

Note

If the value of HistoryLimit is changed, item history snapshots may be deleted.

Applies to