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.
You can use the DefaultWebDocumentViewerContainer class methods to implement and register the following services in the Document Viewer:
Resolves report IDs for reports and subreports. Has priority over the [ReportStorageWebExtension.GetData(String)](xref:DevExpress.XtraReports.Web.Extensions.ReportStorageWebExtension.GetData method.
Enables you to implement 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.
Returns a CachedReportSourceWeb object associated with the specified report.
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.
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 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.|
Use the LoggerService class to handle exceptions that occur on the server side and log other specific operations (document export, requests to open reports from the client side, etc.). To register a custom logger instance, use the LoggerService.Initialize method at application startup.
Common Services for HTML5 Controls
You can use the DefaultClientControlContainer class to register the following custom services common to HTML5 controls:
|IGlobalizationService||Enables you to customize globalization settings of the current thread (including thread impersonation).||UseCustomGlobalizationService<T>|