Interactions Between User, SSRS, and a Delivery Extension


Interactions Between User , SSRS, and a Delivery Extension

Figure 26.1 provides a partial class diagram for the printer delivery extension.

Figure 26.1. Partial class diagram for the printer delivery extension.

The user interacts with SSRS to create a subscription. The interaction could be done from a custom application using a SOAP API call to the SSRS web service's method CreateSubscription() . The interaction can also be performed through Report Manager, which performs the following:

  • Interacts with ISubscriptionBaseUIUserControl implementation inside of a delivery extension to present a UI for data entry

  • Collects data and passes data as CreateSubscription() parameters

  • Interacts with SSRS to create a subscription, as presented in Figure 26.2

Figure 26.2. An application's interaction with SSRS to create a subscription.

Along with other parameters, CreateSubscription() accepts the full pathname of the report and the ExtensionSettings object, which, in turn , contain ParameterValue objects. ParameterValue objects contain name -value pairs with information that a delivery extension expects. For example, for email delivery, one of the parameter values is "TO:" information:

 extensionParams(0) = New ParameterValue() extensionParams(0).Name = "TO" extensionParams(0).Value = "administrator@adventure-works.com" 

SSRS then fills settings with information from ParameterValue and passes settings to a delivery extension for the validation ( ValidateUserData() call). After being validated , SSRS stores settings with the subscription and returns a SubscriptionID string to a user.

When the time to "fire" a subscription comes, the SSRS scheduling engine sends a notification event to the Scheduling and Delivery Processor. See Figure 26.3 for the subscription delivery process.

Figure 26.3. An application's interaction with SSRS to deliver a subscription to a printer.

The Schedule and Delivery Processor receives a notification event, matches it to the subscription, creates a Notification object, and calls the Deliver method in a delivery extension, passing Notification as a parameter of the call.

The delivery extension leverages SSRS's rendering extensions, using the Notification.Report.Render method. The Notification.Report.Render method returns the RenderOutputFile object. The RenderOutputFile.Data property contains a stream with a rendered report.

The delivery extension then "decides" what to do with the stream. In the case of the printer delivery extension, the stream is converted to a metafile and printed using functionality from the System.Drawing.Printing namespace.



Microsoft SQL Server 2005 Reporting Services
Microsoft SQL Server 2005 Reporting Services
ISBN: 0672327996
EAN: 2147483647
Year: 2004
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net