Sets the properties of a data-driven subscription..
Public Function SetDataDrivenSubscriptionProperties( ByVal DataDrivenSubscriptionID As String _ ByVal ExtensionSettings As [Namespace].ExtensionSettings _ ByVal DataRetrievalPlan As [Namespace].DataRetrievalPlan _ ByVal Description As String _ ByVal Active As [Namespace].ActiveState _ ByVal EventType As String _ ByVal MatchData As String _ ByVal Parameters() As [Namespace].ParameterValue _ ) As String Member of [Namespace].ReportingService
public string SetDataDrivenSubscriptionProperties( string DataDrivenSubscriptionID, [Namespace].ExtensionSettings ExtensionSettings, [Namespace].DataRetrievalPlan DataRetrievalPlan, string Description, [Namespace].ActiveState Active, string EventType, string MatchData, [Namespace].ParameterValue Parameters ); Member of [Namespace].ReportingService
- The ID of the subscription.
- An ExtensionSettings object that contains a list of settings that are specific to the delivery extension.
- A DataRetrievalPlan object that contains a list of settings that are required to retrieve data from the delivery query for the subscription.
- A meaningful description that is displayed to users.
- [out] The type of event that triggers the subscription.
- [out] 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.
- An array of ParameterValue objects that contains a list of parameters for the report.
|Update Subscription||Required on a report for a user to add or modify his or her subscriptions.|
|Update Any Subscription||Required on a report for administrators who need to modify other user's subscriptions.|
In order for the data-driven subscription to run properly, the data source that the DataRetrievalPlan object references must have a CredentialRetrieval property set to Store. For more information about the CredentialRetrieval property, see CredentialRetrieval Property.
The Field objects contained in DataSet are checked against the fields that are mapped to delivery extension settings and report parameter values. All fields that are referenced in delivery extension settings and report parameter values must also be enumerated in the dataset.
No validation is performed to ensure that fields enumerated in the dataset are returned by the delivery query. If a field that is enumerated in the dataset is not returned by the delivery query, the report server raises an error when the subscription is processed.
The value of the EventType parameter must correspond to an event processing extension that is configured on the report server. If an event is not handled by an event processing extension, a SOAP exception is thrown with the error code rsInvalidEvent. The event must be handled by an event processing extension that creates notifications. When a value for the EventType parameter is received, the event processing extension is queried to determine whether it creates notifications. If it does not, a SOAP exception is thrown with the error code rsEventNonSubscribeable.
The value of the MatchData parameter depends on the event type. If the event is a TimedSubscription event, a ScheduleDefinition object is required as the MatchData parameter. 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. 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>
The value of the StartDateTime element when passed as an XML string should correspond to the date format ISO 8601. 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. The letter "T" is the date and time separator and "hh", "mm", "ss" represent hour, minute and second respectively. This representation may be immediately followed by a "Z" to indicate Coordinated Universal Time (UTC) or, to indicate the time zone, i.e. the difference between the local time and Coordinated Universal Time, immediately followed by a sign, + or -, followed by the difference from UTC represented as hh:mm.
If the schedule definition for a TimedSubscription is a shared schedule, then you must pass the schedule ID of the shared schedule as the MatchData parameter. The schedule ID is passed as a String, for example, "4608ac1b-fc75-4149-9e15-5a8b5781b843". The schedule ID can be obtained by calling the ListSchedules method.
You can use the XmlSerializer class to automatically convert your object class into an XML string. For more information about the XmlSerializer class, see "System.Xml.XmlSerializer Class" in the .NET Framework documentation.
If the event is a snapshot update subscription, the value of the MatchData parameter should be null (Nothing in Visual Basic).