SetItemHistoryLimit 方法
指定報表伺服器所保留之項目的快照集數。這個方法會套用至 Report 項目類型。
命名空間: ReportService2010
組件: ReportService2010 (在 ReportService2010.dll 中)
語法
'宣告
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetItemHistoryLimit", RequestNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
ResponseNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
Public Sub SetItemHistoryLimit ( _
ItemPath As String, _
UseSystem As Boolean, _
HistoryLimit As Integer _
)
'用途
Dim instance As ReportingService2010
Dim ItemPath As String
Dim UseSystem As Boolean
Dim HistoryLimit As Integer
instance.SetItemHistoryLimit(ItemPath, _
UseSystem, HistoryLimit)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetItemHistoryLimit", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public void SetItemHistoryLimit(
string ItemPath,
bool UseSystem,
int HistoryLimit
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetItemHistoryLimit", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
public:
void SetItemHistoryLimit(
String^ ItemPath,
bool UseSystem,
int HistoryLimit
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetItemHistoryLimit", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
member SetItemHistoryLimit :
ItemPath:string *
UseSystem:bool *
HistoryLimit:int -> unit
public function SetItemHistoryLimit(
ItemPath : String,
UseSystem : boolean,
HistoryLimit : int
)
參數
- ItemPath
型別:System. . :: . .String
項目的完整 URL,包括檔案名稱以及 SharePoint 模式中的延伸模組。
- UseSystem
型別:System. . :: . .Boolean
Boolean 運算式,設定為 true 時,會將項目記錄限制設定為目前的系統項目記錄限制。值為 false 表示項目記錄限制對應於 HistoryLimit 參數中所提供的值。
- HistoryLimit
型別:System. . :: . .Int32
要為項目儲存之項目記錄快照集的數目。值的範圍可以從 -1 到 2,147,483,647。如果值設定為 –1,則會儲存所有項目快照集。
備註
The table below shows header and permissions information on this operation.
SOAP Header Usage |
(Out) ServerInfoHeaderValue |
Native Mode Required Permissions |
|
SharePoint Mode Required Permissions |
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.
[!附註]
If the value of HistoryLimit is changed, item history snapshots may be deleted.