Document Viewer's Client-Side API

The WebDocumentViewerExtension provides an advanced client-side API in addition to the comprehensive server-side object model. This enables web applications based on this control to function more efficiently using a combination of server-side and client-side processing.


Although the entire client API is available on the client side, we recommend that you only use the documented public client-side API for any custom client functionality. The undocumented API can be changed or removed without any notifications, and applications using this API can stop working correctly after upgrading to a newer reporting controls version.

The following namespaces contain classes that implement the web reporting controls' client-side functionality:

Refer to Client-Side Functionality Overview for more information on the DevExpress client-side model implementation, and the Client-Side Events topic to learn how to handle client-side events.

The client-side API of the Web Document Viewer allows you to perform the following actions:

  • Open and Close Reports

    Use the following methods to open and close reports in the Document Viewer:

    Method Description

    Opens the specified report on the Web Document Viewer's client side.


    Closes the document which is currently opened in the Web Document Viewer.

  • Print and Export Reports

    The methods below allow you to print an entire report or its current page and export it to one of the supported third-party formats.

    Method Description
    Print Prints the current document or the document page with the specified index.
    ExportTo Exports the current document to the specified file format.
  • Build Documents

    The following API allows you to build report documents and respond to loading documents to the Document Viewer:

    Method / Event Description

    Starts building a report document.


    Occurs after the Web Document Viewer loads a report document.

  • Navigate Through a Report

    You can navigate through a report using the following methods:

    Method Description

    Displays the specified report page.


    Returns the current page's zero-based index.

  • Manage Interactivity

    The events below allow you to respond to clicking a report area and changing editing field values:

    Event Description

    Occurs when the left mouse button is clicked on a report document.


    Occurs each time an editing field's value changes.

    Use the following method to provide a drill-through functionality to a report:

    Method Description

    Enables navigation between drill-through reports on the client-side.

  • Customize Parameter Editors

    The following events allow you to provide custom editors for report parameters and/or customize look-up parameter values:

    Event Description

    Occurs each time a standard editor is created for a report parameter based on a parameter type.


    Occurs each time a look-up editor is created for a report parameter.

  • Respond to Resetting and Submitting Parameters

    The API listed below allows you to reset and change parameter values.

    Event / Method Description

    Occurs after report parameter values are reset to their default values.


    Occurs after report parameter values are submitted.


    Resets the report parameter values to the default values.

  • Customize Document Viewer Elements and Actions

    The events below allow you to customize UI elements, toolbar actions and export options:

    Event Description

    Allows you to customize the Web Document Viewer's UI elements.


    Enables you to customize the Web Document Viewer's menu actions.


    Allows you to customize the Web Document Viewer's available export formats and corresponding export options.

  • Localize the Document Viewer

    Use the following API to substitute specific localization strings with custom ones programmatically:

    Event / Method Description

    Enables you to customize the Web Document Viewer's localization strings.


    Updates the Web Document Viewer properties' localization settings.

  • Initialize the Document Viewer

    Handle the following event to perform the required actions before the Web Document Viewer's UI initialization:

    Event Description

    Occurs before the Web Document Viewer UI is initialized.

  • Obtain Client-Side Models and Report Preview

    The following methods allow you to obtain client-side models of the Document Viewer and report parameters as well as actual report preview:

    Method Description

    Provides access to the Document Viewer's client-side model.


    Provide access to the report parameters' client-side model.


    Provides access to the report preview.

Available Enumerators' Values

In specific client-side events' handlers, you can obtain the required elements by their IDs using the dedicated constants.

Use the following values to access the existing toolbar commands in the CustomizeMenuActions event:

Value Description
FirstPage The First Page toolbar button.
PrevPage The Previous Page toolbar button.
Pagination The drop-down list that navigates to the selected page.
NextPage The Next Page toolbar button.
LastPage The Last Page toolbar button.
MultipageToggle The Toggle Multipage Mode toolbar button.
HightlightEditingFields The Highlight Editing Fields toolbar button.
ZoomOut The Zoom Out toolbar button.
ZoomSelector The drop-down list with available zoom factors.
ZoomIn The Zoom In toolbar button.
Print The Print toolbar button.
PrintPage The Print Page toolbar button.
ExportTo The Export To toolbar button.
Search The Search toolbar button.

In the CustomizeElements event handler, use the DevExpress.Report.Preview.PreviewElements object's values listed below:

Value Description
RightPanel The panel at the right of the Viewer and containing tabs with the Document Map, Parameters and Export Options.
Surface The Viewer's central part displaying the report document.
Toolbar The Document Viewer's Toolbar.