ReportingService2005.SetSubscriptionProperties(String, ExtensionSettings, String, String, String, ParameterValue[]) Method

Definition

设置订阅的属性。Sets the properties of a subscription.

public:
 void SetSubscriptionProperties(System::String ^ SubscriptionID, ReportService2005::ExtensionSettings ^ ExtensionSettings, System::String ^ Description, System::String ^ EventType, System::String ^ MatchData, cli::array <ReportService2005::ParameterValue ^> ^ Parameters);
public void SetSubscriptionProperties (string SubscriptionID, ReportService2005.ExtensionSettings ExtensionSettings, string Description, string EventType, string MatchData, ReportService2005.ParameterValue[] Parameters);
member this.SetSubscriptionProperties : string * ReportService2005.ExtensionSettings * string * string * string * ReportService2005.ParameterValue[] -> unit
Public Sub SetSubscriptionProperties (SubscriptionID As String, ExtensionSettings As ExtensionSettings, Description As String, EventType As String, MatchData As String, Parameters As ParameterValue())

Parameters

SubscriptionID
String

订阅 ID。The ID of the subscription.

ExtensionSettings
ExtensionSettings

一个 ExtensionSettings 对象,该对象包含特定于传递扩展插件的设置的列表。An ExtensionSettings object that contains a list of settings that are specific to the delivery extension.

Description
String

向用户显示的贴切描述。A meaningful description that is displayed to users.

EventType
String

触发订阅的事件的类型。The type of event that triggers the subscription.

MatchData
String

与指定类型的事件关联的数据。The data that is associated with the specified type of event. 此数据由事件处理扩展插件使用,用来将订阅与已经激发的事件进行匹配。This data is used by an event processing extension to match the subscription with an event that has fired.

Parameters
ParameterValue[]

ParameterValue 对象的数组,它包含用于报表的参数的列表。An array of ParameterValue objects that contains a list of parameters for the report.

Remarks

下表显示了有关此操作的标头和权限信息。The table below shows header and permissions information on this operation.

SOAP 标头SOAP Headers (In) BatchHeaderValue(In) BatchHeaderValue

(Out) ServerInfoHeaderValue(Out) ServerInfoHeaderValue
所需的权限Required Permissions UpdateAnySubscription (UpdateSubscription ,并且用户是报表所有者,订阅是一个定时订阅) UpdateAnySubscription OR (UpdateSubscription AND the user is the report owner and the subscription is a timed subscription)

参数的值 EventType 必须对应于在 Report Server 上配置的事件处理扩展插件。The value of the EventType parameter must correspond to an event processing extension that is configured on the report server. 如果事件处理扩展插件未处理事件类型,则会引发带有错误代码的 SOAP 异常 rsInvalidEventIf the event type is not handled by an event processing extension, a SOAP exception is thrown with the error code rsInvalidEvent. 事件类型必须由创建通知的事件处理扩展插件进行处理。The event type must be handled by an event processing extension that creates notifications. 当收到参数的值时 EventType ,将查询事件处理扩展插件,以确定事件是否创建了通知。When a value for the EventType parameter is received, the event processing extension is queried to determine whether the event creates notifications. 否则,将引发带有错误代码的 SOAP 异常 rsEventNonSubscribeableIf it does not, a SOAP exception is thrown with the error code rsEventNonSubscribeable.

参数的值 MatchData 取决于事件类型。The value of the MatchData parameter depends on the event type. 如果事件是 TimedSubscription 事件, ScheduleDefinition 则需要对象作为 MatchData 参数。If the event is a TimedSubscription event, a ScheduleDefinition object is required as the MatchData parameter. 必须先将对象序列化为 XML,才能将 ScheduleDefinition 其作为字符串值传递,并基于计划创建订阅。You must first serialize the ScheduleDefinition object as XML in order to pass it as a string value and create a subscription based on the schedule. XML 结构可能类似于以下示例:The XML structure might look like the one in the following example:

<ScheduleDefinition>  
   <WeeklyRecurrence>  
      <StartDateTime>2003-02-24T09:00:00-08:00</StartDateTime>  
      <WeeksInterval>1</WeeksInterval>  
      <DaysOfWeek>  
         <Monday>True</Monday>  
         </DaysOfWeek>  
   </WeeklyRecurrence>  
</ScheduleDefinition>  

作为 XML 字符串传递时, StartDateTime 元素的值应对应于日期格式 ISO 8601。The value of the StartDateTime element when passed as an XML string should correspond to the date format ISO 8601. 此国际日期和时间标准是扩展格式 CCYY-MM-DD-Yyyy-mm-ddthh: MM: ss +/-Z,其中 "CC" 表示世纪,"YY" 表示年份,"MM" 表示年份,"DD" 表示天。This international date and time standard is the extended format CCYY-MM-DDThh:mm:ss+/-Z where "CC" represents the century, "YY" the year, "MM" the month and "DD" the day. 字母 "T" 是日期和时间分隔符,"hh"、"mm"、"ss" 分别表示小时、分钟和秒。The letter "T" is the date and time separator and "hh", "mm", "ss" represent hour, minute, and second, respectively. 此表示形式后面可能紧跟 "Z",以指示协调世界时 (UTC) 。This representation may be immediately followed by a "Z" to indicate Coordinated Universal Time (UTC). 若要指示时区(表示为本地时间与协调世界时之间的差值),"Z" 前面有一个 "+" 或 "-" 符号,后跟 UTC 表示为 hh: mm 的差。To indicate the time zone, represented as the difference between the local time and Coordinated Universal Time, "Z" is preceded by a "+" or "-" sign, followed by the difference from UTC represented as hh:mm.

如果 TimedSubscription 的计划定义是共享计划,则必须将共享计划的计划 ID 作为 MatchData 参数传递。If the schedule definition for a TimedSubscription is a shared schedule, you must pass the schedule ID of the shared schedule as the MatchData parameter. 计划 ID 作为进行传递 String ,例如 "4608ac1b-fc75-4149-9e15-5a8b5781b843"。The schedule ID is passed as a String, for example, "4608ac1b-fc75-4149-9e15-5a8b5781b843". 可以通过调用方法来获取计划 ID ListSchedulesThe schedule ID can be obtained by calling the ListSchedules method.

如果事件是快照更新订阅,请 MatchData null Nothing 在 Visual Basic) 中将参数设置为 (。If the event is a snapshot update subscription, set MatchData parameter to null (Nothing in Visual Basic).

Applies to