ReportingService2010.SetExecutionOptions メソッド

定義

指定されたアイテムに対して実行オプションおよび関連する実行プロパティを設定します。 この方法は Report アイテムタイプに適用されます。

public:
 void SetExecutionOptions(System::String ^ ItemPath, System::String ^ ExecutionSetting, ReportService2010::ScheduleDefinitionOrReference ^ Item);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetExecutionOptions", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
public void SetExecutionOptions(string ItemPath, string ExecutionSetting, ReportService2010.ScheduleDefinitionOrReference Item);
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetExecutionOptions", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)>]
[<System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")>]
[<System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)>]
member this.SetExecutionOptions : string * string * ReportService2010.ScheduleDefinitionOrReference -> unit
Public Sub SetExecutionOptions (ItemPath As String, ExecutionSetting As String, Item As ScheduleDefinitionOrReference)

パラメーター

ItemPath
String

項目の完全限定URLと、ファイル名、SharePointモードでは拡張子を含みます。

ExecutionSetting
String

項目が実行されるタイミングを表す文字列です。 値は LiveSnapshot のいずれかにできます。

Item
ScheduleDefinitionOrReference

スケジュール定義または共有スケジュール(ScheduleDefinitionOrReference オブジェクト)で、レポートサーバーがスケジュール上の項目を実行するために使います。

属性

using System;  
using System.Collections.Generic;  
using System.IO;  
using System.Text;  
using System.Web;  
using System.Web.Services;  
using System.Web.Services.Protocols;  

class Sample  
{  
    static void Main(string[] args)  
    {  
        ReportingService2010 rs = new ReportingService2010();  
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" +  
            "ReportService2010.asmx";  
        rs.Credentials =   
            System.Net.CredentialCache.DefaultCredentials;  

        ScheduleDefinition definition = new ScheduleDefinition();  

        // Create the schedule definition.  
        definition.StartDateTime =   
            new DateTime(2010, 2, 22, 10, 15, 0);  
        MinuteRecurrence recurrence = new MinuteRecurrence();  
        recurrence.MinutesInterval = 60;  
        definition.Item = recurrence;  

        // Apply execution settings  
        try  
        {  
            rs.SetExecutionOptions("http://<Server Name>" +  
                "/Docs/Documents/AdventureWorks Sample Reports/" +  
                "Sales Order Detail.rdl",   
                "Snapshot", definition);  
        }  

        catch (SoapException ex)  
        {  
            Console.WriteLine(ex.Detail.OuterXml);  
        }  
    }  
}  
Imports System  
Imports System.IO  
Imports System.Text  
Imports System.Web.Services  
Imports System.Web.Services.Protocols  

Class Sample  

    Public Shared Sub Main()  

        Dim rs As New ReportingService2010()  
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" + _  
            "ReportService2010.asmx"  
        rs.Credentials = _  
            System.Net.CredentialCache.DefaultCredentials  

        Dim definition As New ScheduleDefinition()  
        definition.StartDateTime = _  
            New DateTime(2003, 2, 22, 10, 15, 0)  
        Dim recurrence As New MinuteRecurrence()  
        recurrence.MinutesInterval = 60  
        definition.Item = recurrence  

        Try  
            rs.SetExecutionOptions("http://<Server Name>" + _  
                "/Docs/Documents/AdventureWorks Sample Reports/" + _  
                "Sales Order Detail.rdl", _  
                "Snapshot", definition)  
        Catch ex As SoapException  
            Console.WriteLine(ex.Detail.OuterXml)  
        End Try  

    End Sub  

End Class  

注釈

以下の表は、この操作のヘッダーおよび権限情報を示しています。

SOAPヘッダーの使用 (イン) TrustedUserHeaderValue

(アウト) ServerInfoHeaderValue
ネイティブモードの必要権限 UpdatePolicy
SharePointモードの必要権限 <xref:Microsoft.SharePoint.SPBasePermissions.EditListItems>

Itemパラメータは、ExecutionSettingパラメータの値がSnapshotである場合にのみ有効です。 Itemの値をnull(Visual BasicのNothing)に設定します。ExecutionSettingLiveに設定されている場合。 共有スケジュールを使用している場合は、 Item の値を既存の共有スケジュールを参照する ScheduleReference オブジェクトに設定してください。 一意なスケジュールを定義する場合は、 Item の値を一意なスケジュールを定義する ScheduleDefinition オブジェクトに設定します。 もしアイテムの実行オプションが共有スケジュールに基づいていて、その共有スケジュールが削除された場合、そのスケジュールは個別の項目に関連付けられます。

ExecutionSettingの値をLiveからSnapshotに変更すると、そのアイテムはキャッシュから削除されます。

適用対象