Muokkaa

Jaa


Use a Notification class for a delivery extension

The Notification class is located in the Microsoft.ReportingServices.Interfaces namespace and represents subscription information that delivery extensions use for delivering reports. The Notification class provides many properties that can be used to render the reports for delivery, determine the status of the notification, and set user data.

Screenshot of the Report notification process.

The notification is the central object of any delivery.

When an event fires that is associated with a subscription that uses your custom delivery extension, a notification is created that contains a Report object. The Report object encapsulates the functionality needed to render a given report to a supported rendering format and contains report-specific properties, such as the URL to the report on the server and the name of the report. For more information about the Report class, see Use the Report class for a delivery extension.

You pass the Notification object to the Deliver method of your delivery extension. Your Deliver method should contain specific code to process the notification and to deliver the report.

For an example of how to use the Notification class, see SQL Server Reporting Services Product Samples.

Retry functionality

Reporting Services allows you to create a retry queue for notifications that can't immediately be delivered. After the report server invokes the Deliver method of a delivery extension, the delivery extension can request that the report server retry the delivery at a later point in time. If this event occurs, the report server places the notification in an internal queue and retries the delivery after a specific period of time elapses. Administrators can configure the maximum number of retry attempts that the report server performs and the period between retries in the delivery extension section of the RSReportServer.config file using the MaxNumberOfRetries XML element and the PeriodBetweenRetries XML element. Notifications are removed from the retry queue if delivery later succeeds or if the maximum number of retry attempts is reached. If delivery fails after the maximum number of retries, the notification is discarded.