Bagikan melalui


ReportingService2010.SetExecutionOptions Metode

Definisi

Mengatur opsi eksekusi dan properti eksekusi terkait untuk item tertentu. Metode ini berlaku untuk Report jenis item.

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)

Parameter

ItemPath
String

URL item yang sepenuhnya memenuhi syarat termasuk nama file dan, dalam mode SharePoint, ekstensi.

ExecutionSetting
String

String yang menjelaskan kapan item dijalankan. Nilainya dapat berupa Live atau Snapshot.

Item
ScheduleDefinitionOrReference

Definisi jadwal atau jadwal bersama (ScheduleDefinitionOrReference objek) yang digunakan server laporan untuk menjalankan item sesuai jadwal.

Atribut

Contoh

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  

Keterangan

Tabel di bawah ini memperlihatkan informasi header dan izin pada operasi ini.

Penggunaan Header SOAP (Dalam) TrustedUserHeaderValue

(Keluar) ServerInfoHeaderValue
Izin Yang Diperlukan Mode Asli UpdatePolicy
Izin yang Diperlukan Mode SharePoint <xref:Microsoft.SharePoint.SPBasePermissions.EditListItems>

Parameter Item hanya valid jika nilai ExecutionSetting parameter adalah Snapshot. Atur nilai Item ke null (Nothing di Visual Basic) jika ExecutionSetting diatur ke Live. Jika Anda menggunakan jadwal bersama, atur nilai Item ke ScheduleReference objek yang mereferensikan jadwal bersama yang sudah ada. Jika Anda menentukan jadwal unik, atur nilai Item ke ScheduleDefinition objek yang menentukan jadwal unik. Jika opsi eksekusi untuk item didasarkan pada jadwal bersama dan jadwal bersama tersebut dihapus, jadwal kemudian dikaitkan dengan item individual.

Jika Anda mengubah nilai dari ExecutionSettingLive ke Snapshot, item dihapus dari cache.

Berlaku untuk