次の方法で共有


ReportingService2006.FireEvent メソッド

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

名前空間:  ReportService2006
アセンブリ:  ReportService2006 (ReportService2006.dll)

構文

'宣言
Public Sub FireEvent ( _
    EventType As String, _
    EventData As String, _
    Site As String _
)
'使用
Dim instance As ReportingService2006 
Dim EventType As String 
Dim EventData As String 
Dim Site As String

instance.FireEvent(EventType, EventData, _
    Site)
public void FireEvent(
    string EventType,
    string EventData,
    string Site
)
public:
void FireEvent(
    String^ EventType, 
    String^ EventData, 
    String^ Site
)
member FireEvent : 
        EventType:string * 
        EventData:string * 
        Site:string -> unit
public function FireEvent(
    EventType : String, 
    EventData : String, 
    Site : String
)

パラメーター

  • EventData
    型: System.String
    イベントに関連付けられたデータです。
  • Site
    型: System.String
    SharePoint サイトの完全修飾 URL です。

説明

次の表に、この操作に関連するヘッダーおよび権限の情報を示します。

SOAP ヘッダー

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

必要な権限

ManageWeb

EventType パラメーターは、レポート サーバー構成ファイル (rsreportserver.config) で定義されている既知のイベントのセットと照合されます。 このイベントがレポート サーバー構成ファイルにない場合、SOAP 例外がエラー コード rsUnknownEventType でスローされます。 FireEvent メソッドでは、TimedSubscription イベント型のみがサポートされます。 TimedSubscription イベント型を指定する場合、EventData でサブスクリプション ID も指定する必要があります。サブスクリプション ID は、 CreateSubscription または CreateSubscription によって返されます。

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

使用例

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

関連項目

参照

ReportingService2006 クラス

ReportService2006 名前空間