Méthode SetCacheOptions
Configure la mise en cache d'un élément et fournit des paramètres qui spécifient à quel moment la copie de l'élément mise en cache arrive à expiration. Cette méthode s'applique aux types d'élément de rapport et de Dataset.
Espace de noms : ReportService2010
Assembly : ReportService2010 (en ReportService2010.dll)
Syntaxe
'Déclaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetCacheOptions", RequestNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
ResponseNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
Public Sub SetCacheOptions ( _
ItemPath As String, _
CacheItem As Boolean, _
Item As ExpirationDefinition _
)
'Utilisation
Dim instance As ReportingService2010
Dim ItemPath As String
Dim CacheItem As Boolean
Dim Item As ExpirationDefinition
instance.SetCacheOptions(ItemPath, CacheItem, _
Item)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetCacheOptions", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
public void SetCacheOptions(
string ItemPath,
bool CacheItem,
ExpirationDefinition Item
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetCacheOptions", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
public:
void SetCacheOptions(
String^ ItemPath,
bool CacheItem,
ExpirationDefinition^ Item
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetCacheOptions", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
member SetCacheOptions :
ItemPath:string *
CacheItem:bool *
Item:ExpirationDefinition -> unit
public function SetCacheOptions(
ItemPath : String,
CacheItem : boolean,
Item : ExpirationDefinition
)
Paramètres
- ItemPath
Type : System. . :: . .String
URL complète de l'élément, y compris le nom du fichier et, en mode SharePoint, l'extension.
- CacheItem
Type : System. . :: . .Boolean
Valeur de type Boolean qui indique si une copie de l'élément exécuté est mise en cache. La valeur par défaut est false.
- Item
Type : ReportService2010. . :: . .ExpirationDefinition
Objet ExpirationDefinition qui représente une planification ou une durée d'expiration pour l'élément mis en cache.
Notes
The table below shows header and permissions information on this operation.
SOAP Header Usage |
(Out) ServerInfoHeaderValue |
Native Mode Required Permissions |
|
SharePoint Mode Required Permissions |
EditListItems()()()() |
If CacheItem is set to false, you must set the value for Item to null Nothing nullptr unit une référence Null (Nothing dans Visual Basic) (Nothing in Visual Basic); otherwise, an error occurs. If CacheItem is set to true, you must provide a value for Item; otherwise, a error occurs.
This method can be called only when the execution option for the item is set to Live. For more information about how to set execution options programmatically, see SetExecutionOptions.