ReportingService2006.FireEvent Method

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

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

構文

'宣言
Public Sub FireEvent ( _
    EventType As String, _
    EventData As String, _
    Site As String _
)
public void FireEvent (
    string EventType,
    string EventData,
    string Site
)
public:
void FireEvent (
    String^ EventType, 
    String^ EventData, 
    String^ Site
)
public void FireEvent (
    String EventType, 
    String EventData, 
    String Site
)
public function FireEvent (
    EventType : String, 
    EventData : String, 
    Site : String
)

パラメータ

  • EventType
    イベントの名前です。
  • EventData
    イベントに関連付けられたデータです。
  • Site
    SharePoint サイトの完全修飾 URL です。

解説

EventType パラメータは、レポート サーバー構成ファイルで定義されている既知のイベントのセットと照合されます。このイベントがレポート サーバー構成ファイルにない場合、SOAP 例外がエラー コード rsUnknownEventType でスローされます。FireEvent メソッドでは、TimedSubscription イベント型のみがサポートされます。

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

スレッド セーフ

この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional with Service Pack 2 (SP2), Windows 2000 Professional, Windows 2000 Advanced Server, Windows XP Home Edition, サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。, Windows Vista, Windows Mobile 5.0, Windows Mobile 2003 for Pocket PC, Windows CE 5.0

参照

関連項目

ReportingService2006 Class
ReportingService2006 Members
ReportService2006 Namespace