SetCacheOptions 方法
Configures a report to be cached and provides settings that specify when the cached copy of the report expires.
命名空间: ReportService2006
程序集: ReportService2006(在 ReportService2006.dll 中)
语法
声明
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetCacheOptions", 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("TrustedUserHeaderValue")> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
Public Sub SetCacheOptions ( _
Report As String, _
CacheReport As Boolean, _
Item As ExpirationDefinition _
)
用法
Dim instance As ReportingService2006
Dim Report As String
Dim CacheReport As Boolean
Dim Item As ExpirationDefinition
instance.SetCacheOptions(Report, CacheReport, _
Item)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetCacheOptions", 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("TrustedUserHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public void SetCacheOptions(
string Report,
bool CacheReport,
ExpirationDefinition Item
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetCacheOptions", 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"TrustedUserHeaderValue")]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
public:
void SetCacheOptions(
String^ Report,
bool CacheReport,
ExpirationDefinition^ Item
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetCacheOptions", 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("TrustedUserHeaderValue")>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
member SetCacheOptions :
Report:string *
CacheReport:bool *
Item:ExpirationDefinition -> unit
public function SetCacheOptions(
Report : String,
CacheReport : boolean,
Item : ExpirationDefinition
)
参数
- Report
类型:System. . :: . .String
The fully qualified URL of the report including the file name and .rdl file name extension.
- CacheReport
类型:System. . :: . .Boolean
A Boolean value that indicates whether a copy of the executed report is put in cache. The default value is false.
- Item
类型:ReportService2006. . :: . .ExpirationDefinition
An ExpirationDefinition object that represents either a schedule or an expiration time for the report in cache.
注释
If CacheReport is set to false, you must set the value for Item to null Nothing nullptr unit null 引用(在 Visual Basic 中为 Nothing) (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.