See Also

WebViewer Class  | WebViewer Members

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports.Web Send feedback to Data Dynamics

ViewerType Property

Determines the type of viewer that will be used to show the report in the client machine's browser.

[Visual Basic]
Public Property ViewerType As ViewerType
[C#]
public ViewerType ViewerType {get; set;}

Example

[C#] 

private void cboViewerType_SelectedIndexChanged(object sender, System.EventArgs e) 

    // Set the Viewer Type from the dropdown list to the ActiveReports WebViewer 
    string selection = this.cboViewerType.Items[this.cboViewerType.SelectedIndex].Text; 
    switch (selection) 
    { 
        case "AcrobatReader":  //Acrobat Reader was chosen as the viewer type 
            this.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.AcrobatReader; 
            break; 
        case "ActiveXViewer":  //ActiveX was chosen as the viewer type 
            this.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.ActiveXViewer; 
            break; 
        case "HtmlViewer":  //HTML Viewer was chosen as the viewer type 
            this.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.HtmlViewer; 
            break; 
        case "RawHtml":  //Raw HTML was chosen as the viewer type 
            this.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.RawHtml; 
            break; 
    } 
}

[Visual Basic] 

Private Sub cboViewerType_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboViewerType.SelectedIndexChanged
    ' Set the Viewer Type from the dropdown list to the ActiveReports WebViewer
    Dim selection As String = Me.cboViewerType.Items(Me.cboViewerType.SelectedIndex).Text
    Select Case selection
        Case "AcrobatReader" 'Acrobat Reader was chosen as the viewer type
            Me.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.AcrobatReader
        Case "ActiveXViewer" 'ActiveX was chosen as the viewer type
            Me.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.ActiveXViewer
        Case "HtmlViewer" 'HTML Viewer was chosen as the viewer type
            Me.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.HtmlViewer
        Case "RawHtml" 'Raw HTML was chosen as the viewer type
            Me.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.RawHtml
    End Select
End Sub 'cboViewerType_SelectedIndexChanged

See Also

WebViewer Class  | WebViewer Members

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.