Register Services in the Report Designer
- 4 minutes to read
You can register custom and/or predefined services to provide specific functionality to the Web Report Designer and its built-in Document Preview.
Services for the Report Designer
Custom Services
The following table lists the available services you can implement and register in the Report Designer using the methods of the DefaultReportDesignerContainer class:
Service
Description
Registration Methods
Enables you to manage data connections used by the SQL Data Source Wizard.
RegisterDataSourceWizardConnectionStringsProvider<T>
RegisterDataSourceWizardConfigFileConnectionStringsProvider (to use the data source connections from the application’s configuration file).
Allows you to provide a custom encryption mechanism for storing data source connection strings on the client.
Supports automatic creation of the database schema provider (implemented by the IDBSchemaProviderEx interface).
Provides functionality for customizing the SQL Data Source Wizard of the Web Report Designer.
Enables you to handle server-side errors in the Report Designer.
Enables you to customize the current report and assign a CachedReportSourceWeb object when the Report Designer is about to be switched to the Preview tab.
Predefined Services
The following methods of the DefaultReportDesignerContainer registers predefined services that override the default Report Designer behavior:
Method Description DefaultReportDesignerContainer.AllowPassingDataSourceConnectionParametersToClient Allows the Web Report Designer to pass data source connection parameters from the application configuration file to the client. DefaultReportDesignerContainer.EnableCustomSql Enables editing custom SQL strings in the SQL Data Source Wizard. Report Storage Extension
Create a descendant from the ReportStorageWebExtension class and register it using the static ReportStorageWebExtension.RegisterExtensionGlobal method to define how reports should be stored on the server side of your web application.
Services for the Report Designer’s Preview
Custom Services
You can create and register the following custom services using the methods of the DefaultWebDocumentViewerContainer class to extend the Document Viewer’s functionality:
Service
Description
Registration Methods
Enables you to implement a custom authorization mechanism in your web reporting application.
Enables you to provide a custom authorization mechanism for exported documents in your web reporting application.
Allows you to log events related to processing reports and generated documents by the Web Document Viewer engine.
Provides drill-through functionality to web reports.
Resolves reports that can be displayed by the Web Document Viewer.
Enables you to perform custom operations with a Document Viewer’s currently opened document.
Allows you to restore a data connection on deserializing a report.
Enables you to handle server-side errors in the Web Document Viewer.
Allows you to override the default URI that a browser uses to get an export result.
Enables you to provide time settings to clean a storage for storing documents and reports.
Enables you to provide time settings to clean a cache for storing documents and reports.
Predefined Services
Use the following methods of the DefaultWebDocumentViewerContainer to register the corresponding predefined services:
Method Description DefaultWebDocumentViewerContainer.UseFileDocumentStorage Specifies a path and synchronization mode for the report document’s file storage. DefaultWebDocumentViewerContainer.UseEmptyStoragesCleaner Replaces a service that is used to clean the report and document storage with an empty service, avoiding automatic cleaning of this storage. DefaultWebDocumentViewerContainer.EnablePassingExportOptionsPasswordsToClient Enables passing PDF/Excel passwords specified in the Report Designer to the Web Document Viewer.
Common Services for HTML5 Controls
Logger Service
Use the LoggerService class to handle exceptions that occur on the server side and log certain other operations (for instance, exporting documents, requests to open reports from the client side , etc.). To register a custom logger instance, use the LoggerService.Initialize method at the application startup.
Custom Services
You can create custom services common for HTML5 controls and register them using the DefaultClientControlContainer class.
Service Description Registration Method IGlobalizationService Enables you to customize globalization settings of the current thread (including thread impersonation). UseCustomGlobalizationService<T>