ReportingService2005.FireEvent(String, String) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
제공된 매개 변수를 기준으로 이벤트를 트리거합니다.
public:
void FireEvent(System::String ^ EventType, System::String ^ EventData);
public void FireEvent (string EventType, string EventData);
member this.FireEvent : string * string -> unit
Public Sub FireEvent (EventType As String, EventData As String)
매개 변수
- EventType
- String
이벤트의 이름입니다.
- EventData
- String
이벤트와 연결된 데이터입니다.
예제
이 코드 예제를 컴파일하려면 Reporting Services WSDL을 참조하고 특정 네임스페이스를 가져와야 합니다. 자세한 내용은 코드 예제 컴파일 및 실행을 참조하세요. 다음 코드 예제에서는 이름에 "Sales"라는 단어가 포함된 모든 보고서에 대해 보고서 서버 데이터베이스를 검색합니다.
Imports System
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2005()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
' Get the subscriptions
Dim subs As Subscription() = rs.ListSubscriptions("/SampleReports/Company Sales", Nothing)
Try
If Not (subs Is Nothing) Then
' Fire the first subscription in the list
rs.FireEvent("TimedSubscription", subs(0).SubscriptionID)
Console.WriteLine("Event fired.")
End If
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub 'Main
End Class 'Sample
using System;
class Sample
{
public static void Main()
{
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Get the subscriptions
Subscription[] subs = rs.ListSubscriptions("/SampleReports/Company Sales", null);
try
{
if (subs != null)
{
// Fire the first subscription in the list
rs.FireEvent("TimedSubscription", subs[0].SubscriptionID);
Console.WriteLine("Event fired.");
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
설명
다음 표에서는 이 작업에 대한 헤더 및 사용 권한 정보를 보여 줍니다.
SOAP 헤더 | (In) BatchHeaderValue (Out) ServerInfoHeaderValue |
필요한 권한 | GenerateEvents (시스템) |
EventType
매개 변수는 보고서 서버 구성 파일(rsreportserver.config)에 정의된 알려진 이벤트 집합과 일치합니다. 이벤트가 보고서 서버 구성 파일에 없는 경우 오류 코드 rsUnknownEventType
가 인 SOAP 예외가 throw됩니다. 메서드는 FireEvent 이벤트 형식의 TimedSubscription
실행만 지원합니다. TimedSubscription 이벤트 형식을 지정할 때 또는 CreateDataDrivenSubscription에서 반환 CreateSubscription 되는 의 EventData
구독 ID도 지정해야 합니다.
메서드는 FireEvent 매개 변수에 제공된 데이터를 확인하거나 유효성을 EventData
검사하지 않습니다. 빈 문자열을 포함하여 모든 문자열 값이 유효합니다.