Поделиться через


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

Строка, описывающая время выполнения элемента. Возможные значения: Live и Snapshot.

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 (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
Необходимые разрешения в собственном режиме UpdatePolicy
Необходимые разрешения в режиме Интеграции с SharePoint <xref:Microsoft.SharePoint.SPBasePermissions.EditListItems>

Параметр Item действителен только в том случае, если параметр имеет Snapshotзначение ExecutionSetting . Задайте для параметра значение Itemnull (Nothing в Visual Basic), если ExecutionSetting для задано значение Live. Если вы используете общее расписание, присвойте Item значение объекту ScheduleReference , который ссылается на существующее общее расписание. Если вы определяете уникальное расписание, присвойте Item значение объекту ScheduleDefinition , который определяет уникальное расписание. Если параметры выполнения для элемента основаны на общем расписании и это общее расписание удаляется, расписание затем связывается с отдельным элементом.

Если изменить значение ExecutionSetting с Live на Snapshot, элемент удаляется из кэша.

Применяется к