ReportingService2006.FireEvent(String, String, String) 메서드

정의

제공된 매개 변수를 기준으로 이벤트를 발생시킵니다.

public:
 void FireEvent(System::String ^ EventType, System::String ^ EventData, System::String ^ Site);
public void FireEvent (string EventType, string EventData, string Site);
member this.FireEvent : string * string * string -> unit
Public Sub FireEvent (EventType As String, EventData As String, Site As String)

매개 변수

EventType
String

이벤트의 이름입니다.

EventData
String

이벤트와 연결된 데이터입니다.

Site
String

SharePoint 사이트에 대한 정규화된 URL입니다.

예제

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)  
    {  
        ReportingService2006 rs = new ReportingService2006();  
        rs.Url = "http://<Server Name>" +  
            "/_vti_bin/ReportServer/ReportService2006.asmx";  
        rs.Credentials =   
            System.Net.CredentialCache.DefaultCredentials;  

        string site = "http://<Server Name>";  

        // Get the subscriptions  
        Subscription[] subs =   
            rs.ListMySubscriptions(site);  

        try  
        {  
            if (subs != null)  
            {  
                // Fire the first subscription in the list  
                rs.FireEvent("TimedSubscription",   
                    subs[0].SubscriptionID, site);  
                Console.WriteLine("Event fired.");  
            }  
        }  
        catch (Exception ex)  
        {  
            Console.WriteLine(ex.Message);  
        }  
    }  
}  
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 ReportingService2006()  
        rs.Url = "http://<Server Name>" + _  
            "/_vti_bin/ReportServer/ReportService2006.asmx"  
        rs.Credentials = _  
            System.Net.CredentialCache.DefaultCredentials  

        Dim site As String = "http://<Server Name>"  

        ' Get the subscriptions  
        Dim subs As Subscription() = _  
            rs.ListAllSubscriptions(site)  

        Try  
            If Not (subs Is Nothing) Then  
                ' Fire the first subscription in the list  
                rs.FireEvent("TimedSubscription", subs(0).SubscriptionID, site)  
                Console.WriteLine("Event fired.")  
            End If  
        Catch ex As Exception  
            Console.WriteLine(ex.Message)  
        End Try  

    End Sub  

End Class  

설명

다음 표에서는 이 작업에 대한 헤더 및 사용 권한 정보를 보여 줍니다.

SOAP 헤더 (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
필요한 권한 <xref:Microsoft.SharePoint.SPBasePermissions.ManageWeb>

EventType 매개 변수는 보고서 서버 구성 파일(rsreportserver.config)에 정의된 알려진 이벤트 집합과 일치합니다. 이벤트가 보고서 서버 구성 파일에 없는 경우 오류 코드 rsUnknownEventType가 인 SOAP 예외가 throw됩니다. 메서드는 FireEvent 이벤트 유형만 지원합니다 TimedSubscription . TimedSubscription 이벤트 형식을 지정할 때 또는 CreateSubscription에서 반환 CreateSubscription 되는 의 EventData구독 ID도 지정해야 합니다.

메서드는 FireEvent 매개 변수에 제공된 데이터를 확인하거나 유효성을 EventData 검사하지 않습니다. 빈 문자열을 포함하여 모든 문자열 값이 유효합니다.

적용 대상