The requested page is not available for the requested platform. You are viewing the content for Default platform.
All docs
V19.1
19.2 (preview)
19.1
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ReportPreview Class

Provides information about a report preview.

Declaration

class ReportPreview extends Analytics.Utils.Disposable

Properties

documentBuilding Property

Provides access to a value that specifies whether the document is currently building.

Declaration

documentBuilding: ko.Observable<boolean>

Property Value

Type Description
ko.Observable<boolean>

A knockout observable object that specifies whether the document is building.

pageIndex Property

Provides access to the current document page's index.

Declaration

pageIndex: ko.Observable<number>

Property Value

Type Description
ko.Observable<number>

A knockout observable object that specifies the zero-based index of the current page.

pages Property

Provides access to document pages.

Declaration

pages: ko.ObservableArray<Internal.PreviewPage>

Property Value

Type Description
ko.ObservableArray<PreviewPage>

An array of objects that specify document pages.

showMultipagePreview Property

Enables the Document Viewer's multi-page mode.

Declaration

showMultipagePreview: ko.Observable<boolean>

Property Value

Type Description
ko.Observable<boolean>

A knockout observable object that specifies whether the multi-page mode is enabled.

Remarks

The following code snippet demonstrates how to enable the multi-page mode in the ASPxClientWebDocumentViewer.BeforeRender event handler.

<script type="text/javascript" id="script">
     function BeforeRender(s, e) {
         e.reportPreview.showMultipagePreview(true);
     }
</script>

<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server" ReportSourceId="WebReportDesigner.XtraReport1">
     <ClientSideEvents BeforeRender="BeforeRender"/>
</dx:ASPxWebDocumentViewer>

zoom Property

Zooms the Document Viewer's current document.

Declaration

zoom: ko.PureComputed<any>

Property Value

Type Description
ko.PureComputed<any>

A knockout observable object that specifies the zoom factor.

Remarks

Call the zoom method to zoom a document by a specific zoom factor passed as a parameter.

You can also use the following values of the DevExpress.Report.Preview.ZoomAutoBy object as a function parameter: None, WholePage and PageWidth.

<script>
    function Init(s, e) {
        s.GetReportPreview().zoom(0.9);
        //s.GetReportPreview().zoom(DevExpress.Report.Preview.ZoomAutoBy.PageWidth);
    }
</script>

<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server" ReportSourceId="DXWebApplication1.XtraReport1">
    <ClientSideEvents Init="Init"/>
</dx:ASPxWebDocumentViewer>