GrapeCity ActiveReports for .NET 12.0J
ViewerType プロパティ
使用例 

クライアントマシンのブラウザでレポートの表示に使用するビューワの種類を決定します。
構文
'宣言
 
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
private void cboViewerType_SelectedIndexChanged(object sender, System.EventArgs e)
{
    // ビューワの種類を選択します。
    string selection = this.cboViewerType.Items[this.cboViewerType.SelectedIndex].Text;
    switch (selection)
    {
        case "AcrobatReader":  //ViewerTypeをAcrobat Readerに設定します。
            this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.AcrobatReader;
            break;
        case "HtmlViewer":  //ViewerTypeをHTMLViewerに設定します。
            this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.HtmlViewer;
            break;
        case "RawHtml":  //ViewerTypeをRawHtmlに設定します。
            this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.RawHtml;
            break;
        case "FlashViewer":  //ViewerTypeをFlashViewerに設定します。
            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
    ' ビューワの種類を選択します。
    Dim selection As String = Me.cboViewerType.Items(Me.cboViewerType.SelectedIndex).Text
    Select Case selection
        Case "AcrobatReader" 'ViewerTypeをAcrobat Readerに設定します。
            Me.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.AcrobatReader
        Case "HtmlViewer" 'ViewerTypeをHTMLViewerに設定します。
            Me.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.HtmlViewer
        Case "RawHtml" 'ViewerTypeをRawHTMLrに設定します。
            Me.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.RawHtml
        Case "FlashViewer" 'ViewerTypeをFlashViewerに設定します。
            Me.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.FlashViewer
    End Select
End Sub
参照

関連項目

WebViewer クラス
WebViewer メンバ

 

 


Copyright © 2003 GrapeCity inc. All rights reserved.