共用方式為


SetReportHistoryLimit 方法

指定報表伺服器在報表伺服器資料庫中保留的報表快照集數目。

命名空間:  ReportService2006
組件:  ReportService2006 (在 ReportService2006.dll 中)

語法

'宣告
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetReportHistoryLimit", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",  _
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
Public Sub SetReportHistoryLimit ( _
    Report As String, _
    UseSystem As Boolean, _
    HistoryLimit As Integer _
)
'用途
Dim instance As ReportingService2006
Dim Report As String
Dim UseSystem As Boolean
Dim HistoryLimit As Integer

instance.SetReportHistoryLimit(Report, _
    UseSystem, HistoryLimit)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetReportHistoryLimit", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
public void SetReportHistoryLimit(
    string Report,
    bool UseSystem,
    int HistoryLimit
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetReportHistoryLimit", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
public:
void SetReportHistoryLimit(
    String^ Report, 
    bool UseSystem, 
    int HistoryLimit
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetReportHistoryLimit", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
member SetReportHistoryLimit : 
        Report:string * 
        UseSystem:bool * 
        HistoryLimit:int -> unit 
public function SetReportHistoryLimit(
    Report : String, 
    UseSystem : boolean, 
    HistoryLimit : int
)

參數

  • 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 Headers

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

Required Permissions

EditListItems()()()()

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

[!附註]

If the value of HistoryLimit is changed, report history snapshots might be deleted.