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
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
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
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
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
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.Reporting.Viewer.ZoomAutoBy object as a function parameter: None, WholePage and PageWidth.

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

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