ReportingService2005.SetCacheOptions(String, Boolean, ExpirationDefinition) Method


配置用于缓存的报表并提供指定报表的缓存副本何时到期的设置。Configures a report for caching and provides settings that specify when the cached copy of the report expires.

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



报表的完整路径名。The full path name of the report.


一个Boolean值,该值指示被执行报表的副本是否放在缓存中。A Boolean value that indicates whether a copy of the executed report is placed in cache. 默认值为 falseThe default value is false.


一个 ExpirationDefinition 对象,该对象表示缓存中的报表的计划或到期时间。An ExpirationDefinition object representing either a schedule or an expiration time for the report in cache.


下表显示了有关此操作的标头和权限信息。The table below shows header and permissions information on this operation.

SOAP 标头SOAP Headers (In) BatchHeaderValue(In) BatchHeaderValue

(Out) ServerInfoHeaderValue(Out) ServerInfoHeaderValue
所需的权限Required Permissions UpdatePolicy

如果 CacheReport 设置为 false ,则将的值设置 Itemnull Nothing Visual Basic) 中 (; 将出现错误。If CacheReport is set to false, set the value for Item to null (Nothing in Visual Basic); an error occurs. 如果 CacheReport 设置为 true ,则必须为提供一个值 Item ; 否则,将导致错误。If CacheReport is set to true, you must provide a value for Item; otherwise, it results in an error.

SetCacheOptions仅当报表的执行选项设置为时,才能调用方法 LiveThe SetCacheOptions method can be called only when the execution option for the report is set to Live. 有关以编程方式设置执行选项的详细信息,请参阅 SetExecutionOptionsFor more information about setting execution options programmatically, see SetExecutionOptions.

Applies to