ReportingService2005.SetCacheOptions Method

Configures a report for caching and provides settings that specify when the cached copy of the report expires.

Namespace:  ReportService2005
Assembly:  ReportService2005 (in ReportService2005.dll)


<SoapHeaderAttribute("BatchHeaderValue")> _
<SoapDocumentMethodAttribute("", RequestNamespace := "",  _
    ResponseNamespace := "",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
Public Sub SetCacheOptions ( _
    Report As String, _
    CacheReport As Boolean, _
    Item As ExpirationDefinition _
Dim instance As ReportingService2005
Dim Report As String
Dim CacheReport As Boolean
Dim Item As ExpirationDefinition

instance.SetCacheOptions(Report, CacheReport, _
[SoapDocumentMethodAttribute("", RequestNamespace = "", 
    ResponseNamespace = "", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public void SetCacheOptions(
    string Report,
    bool CacheReport,
    ExpirationDefinition Item
[SoapDocumentMethodAttribute(L"", RequestNamespace = L"", 
    ResponseNamespace = L"", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
void SetCacheOptions(
    String^ Report, 
    bool CacheReport, 
    ExpirationDefinition^ Item
[<SoapDocumentMethodAttribute("", RequestNamespace = "", 
    ResponseNamespace = "", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
member SetCacheOptions : 
        Report:string * 
        CacheReport:bool * 
        Item:ExpirationDefinition -> unit 
public function SetCacheOptions(
    Report : String, 
    CacheReport : boolean, 
    Item : ExpirationDefinition


  • CacheReport
    Type: System.Boolean
    A Boolean value that indicates whether a copy of the executed report is placed in cache. The default value is false.


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

SOAP Headers

(In) BatchHeaderValue

(Out) ServerInfoHeaderValue

Required Permissions


If CacheReport is set to false, set the value for Item to nulla null reference (Nothing in Visual Basic) (Nothing in Visual Basic); an error occurs. If CacheReport is set to true, you must provide a value for Item; otherwise, it results in an error.

The SetCacheOptions method can be called only when the execution option for the report is set to Live. For more information about setting execution options programmatically, see SetExecutionOptions.