Share via


ReportingService2006.SetCacheOptions Method

Definition

Configures a report to be cached and provides settings that specify when the cached copy of the report expires.

public:
 void SetCacheOptions(System::String ^ Report, bool CacheReport, ReportService2006::ExpirationDefinition ^ Item);
public void SetCacheOptions (string Report, bool CacheReport, ReportService2006.ExpirationDefinition Item);
member this.SetCacheOptions : string * bool * ReportService2006.ExpirationDefinition -> unit
Public Sub SetCacheOptions (Report As String, CacheReport As Boolean, Item As ExpirationDefinition)

Parameters

Report
String

The fully qualified URL of the report including the file name and .rdl file name extension.

CacheReport
Boolean

A Boolean value that indicates whether a copy of the executed report is put in cache. The default value is false.

Item
ExpirationDefinition

An ExpirationDefinition object that represents either a schedule or an expiration time for the report in cache.

Remarks

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

SOAP Headers (In) TrustedUserHeaderValue

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

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

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

Applies to