Register Services in the Document Viewer
- 3 min to read
You can register custom and/or predefined services to provide specific functionality to the Web Document Viewer.
The following table lists the available services you can implement and register in the Document Viewer using the methods of the DefaultWebDocumentViewerContainer class:
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.
Use the following methods of the DefaultWebDocumentViewerContainer to register the corresponding predefined services that override the default Document Viewer behavior:
|DefaultWebDocumentViewerContainer.UseFileReportStorage||Specifies a path for the report's file storage.|
|DefaultWebDocumentViewerContainer.UseFileDocumentStorage||Specifies a path for the report document's file storage.|
|DefaultWebDocumentViewerContainer.UseFileExportedDocumentStorage||Specifies a path for the exported 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.|
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.
Common Services for HTML5 Controls
You can create custom services common for HTML5 controls and register them using the DefaultClientControlContainer class.
|IGlobalizationService||Enables you to customize globalization settings of the current thread (including thread impersonation).||UseCustomGlobalizationService<T>|