Extend a Report Service with Custom Functionality
- 2 minutes to read
This document describes the tools used to extend a report service with custom functionality. To extend a report service, you can directly override its methods or use Managed Extensibility Framework (MEF) extensions. Both of these approaches are described in this document.
Override Report Service Methods
To customize report service functionality, you can override its virtual methods.
This approach is suitable for minor changes to the behavior of the report service at different stages of its life cycle.
Use MEF Extensions
Using MEF extensions is the preferable approach to report service customization.
To use an extension, add a new class with the [Export] attribute that implements the corresponding interface.
The MEF extension interfaces that can be implemented to extend a report service are contained in the DevExpress.XtraReports.Service.Extensions namespace. The following interfaces are available.
|IDataSourceService||If implemented by a class, provides the functionality to work with report data sources.|
|IReportResolver||If implemented by a class, resolves reports by their names.|
|IReportBuildInterceptor||If implemented by a class, processes a report before starting to build a temporary document from it, and after the document is built.|
|IBinaryDataStorageExtension||If implemented by a class, provides a separate storage for the document’s binary data.|
|IDocumentExportInterceptor||If implemented by a class, processes a document before starting to export it to a third-party format and after exporting is complete.|
|IDocumentDataStorageProvider||If implemented by a class, provides settings to store a temporary document on the server side.|
For more information on the Managed Extensibility Framework, refer to the following article: Managed Extensibility Framework (MEF).