ReportingService2010.FireEvent(String, String, String) メソッド

定義

指定されたパラメーターに基づいてイベントを発生させます。

public:
 void FireEvent(System::String ^ EventType, System::String ^ EventData, System::String ^ SiteUrl);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/FireEvent", 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("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
[System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")]
public void FireEvent (string EventType, string EventData, string SiteUrl);
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/FireEvent", 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("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)>]
[<System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")>]
member this.FireEvent : string * string * string -> unit
Public Sub FireEvent (EventType As String, EventData As String, SiteUrl As String)

パラメーター

EventType
String

イベントの名前です。

EventData
String

イベントに関連付けられたデータです。

SiteUrl
String

SharePoint サイトの完全修飾 URL です。

ネイティブ モードでこのメソッドを呼び出す場合は、null (Visual Basic の場合は Nothing) を指定します。

属性

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;  

        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 ReportingService2010()  
        rs.Url = "http://<Server Name>" + _  
            "/_vti_bin/ReportServer/ReportService2010.asmx"  
        rs.Credentials = _  
            System.Net.CredentialCache.DefaultCredentials  

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

        ' Get the subscriptions  
        Dim subs As Subscription() = _  
            rs.ListSubscriptions(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
ネイティブ モードで必要なアクセス許可 GenerateEvents (システム)
SharePoint モードに必要なアクセス許可 <xref:Microsoft.SharePoint.SPBasePermissions.ManageWeb>

ネイティブ モードで SiteUrl パラメーターに NULL 以外の値が指定された場合、このメソッドは、rsUnsupportedParameterForModeException 例外をスローします。

EventType パラメーターは、レポート サーバー構成ファイル (rsreportserver.config) で定義されている既知のイベントのセットと照合されます。 このイベントがレポート サーバー構成ファイルにない場合、SOAP 例外がエラー コード rsUnknownEventType でスローされます。 このメソッドは、イベントの種類 TimedSubscription および RefreshCache をサポートします。

EventTypeTimedSubscription の場合は、EventData でサブスクリプション ID も指定する必要があります。サブスクリプション ID は、CreateSubscriptionCreateDataDrivenSubscription 、または CreateDataDrivenSubscription によって返されます。 EventTypeRefreshCache の場合は、EventData でキャッシュ更新計画も指定する必要があります。キャッシュ更新計画は、CreateCacheRefreshPlan によって返されます。

FireEvent メソッドでは、EventData パラメーターで指定したデータは確認も検証もされません。 空の文字列を含む、すべての文字列値が有効です。

適用対象