GrapeCity.ActiveReports.Web.v9 Assembly > GrapeCity.ActiveReports.Web Namespace > WebViewer Class : ViewerType Property |
'Declaration Public Property ViewerType As ViewerType
public ViewerType ViewerType {get; set;}
private void cboViewerType_SelectedIndexChanged(object sender, System.EventArgs e) { // Set the Viewer Type from the dropdown list in the Viewer type property string selection = this.cboViewerType.Items[this.cboViewerType.SelectedIndex].Text; switch (selection) { case "AcrobatReader": //Acrobat Reader was chosen as the viewer type this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.AcrobatReader; break; case "HtmlViewer": //HTML Viewer was chosen as the viewer type this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.HtmlViewer; break; case "RawHtml": //Raw HTML was chosen as the viewer type this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.RawHtml; break; case "FlashViewer": //Flash Viewer was chosen as the viewer type this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.FlashViewer; break; } }
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 = GrapeCity.ActiveReports.Web.ViewerType.AcrobatReader Case "HtmlViewer" 'HTML Viewer was chosen as the viewer type Me.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.HtmlViewer Case "RawHtml" 'Raw HTML was chosen as the viewer type Me.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.RawHtml Case "FlashViewer" 'Flash Viewer was chosen as the viewer type Me.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.FlashViewer End Select End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2