ReportingService2005.FireEvent Method

Triggers an event based on the supplied parameters.

命名空间: Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005
程序集: ReportService2005 (in reportingservice2005.dll)

语法

声明
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction:=SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("BatchHeaderValue")> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/FireEvent", RequestNamespace:="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace:="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Sub FireEvent ( _
    EventType As String, _
    EventData As String _
)
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out)] 
[SoapHeaderAttribute("BatchHeaderValue")] 
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/FireEvent", RequestNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public void FireEvent (
    string EventType,
    string EventData
)
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction=SoapHeaderDirection::Out)] 
[SoapHeaderAttribute(L"BatchHeaderValue")] 
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/FireEvent", RequestNamespace=L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace=L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse::Literal, ParameterStyle=SoapParameterStyle::Wrapped)] 
public:
void FireEvent (
    String^ EventType, 
    String^ EventData
)
/** @attribute SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out) */ 
/** @attribute SoapHeaderAttribute("BatchHeaderValue") */ 
/** @attribute SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/FireEvent", RequestNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped) */ 
public void FireEvent (
    String EventType, 
    String EventData
)
SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out) 
SoapHeaderAttribute("BatchHeaderValue") 
SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/FireEvent", RequestNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped) 
public function FireEvent (
    EventType : String, 
    EventData : String
)

参数

  • EventType
    The name of the event.
  • EventData
    The data that is associated with the event.

备注

The EventType parameter is matched against the known set of events that are defined in the report server configuration file. If the event is not in the report server configuration file, a SOAP exception is thrown with an error code of rsUnknownEventType. The FireEvent method only supports firing the TimedSubscription event type.

The FireEvent method does not verify or validate the data supplied in the EventData parameter. Any string value is valid, including an empty string.

示例

To compile this code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see 编译和运行代码示例. The following code example searches the report server database for all reports whose names contain the word "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);
      }
   }
}

线程安全

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

平台

开发平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

目标平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

请参阅

参考

ReportingService2005 Class
ReportingService2005 Members
Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005 Namespace