Register Services in the Document Viewer
- 3 minutes to read
You can register custom and/or predefined services to add specific functionality to the Web Document Viewer.
Custom Services
You can use the DefaultWebDocumentViewerContainer class methods to implement and register the following services in the Document Viewer:
Service | Description | Registration Methods |
---|---|---|
Resolves report IDs for reports and subreports. Has priority over the ReportStorageWebExtension.GetData(String) method. | ||
Enables you to implement access permissions for reports and documents in the Web Document Viewer. | ||
Enables you to implement access permissions for exported documents in the Web Document Viewer. | ||
Allows you to log events that occur when the Web Document Viewer loads and processes a report. You can modify a report or a document, or perform any action when an event occurs. | ||
Provides drill-through functionality to web reports. | ||
Resolves reports that can be displayed by the Web Document Viewer. Does not operate in asynchronous mode. | ||
Allows you to perform custom operations on the Document Viewer’s currently opened document. | ||
Allows you to restore a data connection on report deserialization. | ||
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 set the time to clean the document and report storage. | ||
Allows you to set the time to clean the cache that stores documents and reports. |
Predefined Services
Use the following methods of the DefaultWebDocumentViewerContainer to register the corresponding predefined services that override the default Document Viewer behavior:
Method | Description |
---|---|
DefaultWebDocumentViewerContainer.UseFileReportStorage | Specifies the path to the file cache storage used to cache the reports from which the Viewer generates documents. |
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 the service used to clean the report and document storage with an empty service, so that the storage is not automatically cleaned. |
DefaultWebDocumentViewerContainer.EnablePassingExportOptionsPasswordsToClient | Passwords for PDF/Excel export (specified in the End User Report Designer or stored in the REPX file) are not passed to the Web Document Viewer unless this method is called at application startup. |
Common Services for HTML5 Controls
You can use the DefaultClientControlContainer class to register the following custom services common to HTML5 controls:
Service | Description | Registration Method |
---|---|---|
IGlobalizationService | Enables you to customize globalization settings of the current thread (including thread impersonation). | UseCustomGlobalizationService<T> |