次の方法で共有


IReportViewerMessages インターフェイス

 

発行: 2016年4月

アプリケーションで、カスタマイズしたユーザー インターフェイス メッセージを提供できるようにします。

名前空間:   Microsoft.Reporting.WinForms
アセンブリ:  Microsoft.ReportViewer.WinForms (Microsoft.ReportViewer.WinForms.dll 内)

構文

public interface IReportViewerMessages
public interface class IReportViewerMessages
type IReportViewerMessages = interface end
Public Interface IReportViewerMessages

プロパティ

名前 説明
System_CAPS_pubproperty BackButtonToolTip

[戻る] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty BackMenuItemText

[戻る] メニュー項目のテキストを提供します。

System_CAPS_pubproperty ChangeCredentialsText

[資格情報の変更] ボタンのテキストを提供します。

System_CAPS_pubproperty CurrentPageTextBoxToolTip

[現在のページ] テキスト ボックスのツールヒント テキストを提供します。

System_CAPS_pubproperty DocumentMapButtonToolTip

[見出しマップ] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty DocumentMapMenuItemText

[見出しマップ] メニュー項目のテキストを提供します。

System_CAPS_pubproperty ExportButtonToolTip

[エクスポート] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty ExportMenuItemText

[エクスポート] メニュー項目のテキストを提供します。

System_CAPS_pubproperty FalseValueText

false の値のテキストを提供します。

System_CAPS_pubproperty FindButtonText

[検索] ボタンのテキストを提供します。

System_CAPS_pubproperty FindButtonToolTip

[検索] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty FindNextButtonText

[次を検索] ボタンのテキストを提供します。

System_CAPS_pubproperty FindNextButtonToolTip

[次を検索] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty FirstPageButtonToolTip

[先頭ページ] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty LastPageButtonToolTip

[最終ページ] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty NextPageButtonToolTip

[次のページ] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty NoMoreMatches

それ以上一致する項目がないことを示すメッセージのテキストを提供します。

System_CAPS_pubproperty NullCheckBoxText

[Null] チェック ボックスのテキストを提供します。

System_CAPS_pubproperty NullCheckBoxToolTip

[Null] チェック ボックスのツールヒント テキストを提供します。

System_CAPS_pubproperty NullValueText

null の値のテキストを提供します。

System_CAPS_pubproperty PageOf

ページ割り当てメッセージのテキストを提供します。

System_CAPS_pubproperty PageSetupButtonToolTip

[ページ設定] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty PageSetupMenuItemText

[ページ設定] メニュー項目のテキストを提供します。

System_CAPS_pubproperty ParameterAreaButtonToolTip

[パラメーター エリア] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty PasswordPrompt

パスワード プロンプトのテキストを提供します。

System_CAPS_pubproperty PreviousPageButtonToolTip

[前のページ] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty PrintButtonToolTip

[印刷] ボタンのテキストを提供します。

System_CAPS_pubproperty PrintLayoutButtonToolTip

[印刷レイアウト] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty PrintLayoutMenuItemText

[印刷レイアウト] メニュー項目のテキストを提供します。

System_CAPS_pubproperty PrintMenuItemText

[印刷] メニュー項目のテキストを提供します。

System_CAPS_pubproperty ProgressText

レポートの処理中に表示される進行状況メッセージのテキストを提供します。

System_CAPS_pubproperty RefreshButtonToolTip

[最新の情報に更新] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty RefreshMenuItemText

[最新の情報に更新] メニュー項目のテキストを提供します。

System_CAPS_pubproperty SearchTextBoxToolTip

[検索] テキスト ボックスのツールヒント テキストを提供します。

System_CAPS_pubproperty SelectAll

複数の値を含んでいるドロップダウン リスト ボックスの [すべて選択] 項目のテキストを提供します。

System_CAPS_pubproperty SelectAValue

値を選択するプロンプトのテキストを提供します。

System_CAPS_pubproperty StopButtonToolTip

[停止] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty StopMenuItemText

[停止] メニュー項目のテキストを提供します。

System_CAPS_pubproperty TextNotFound

テキストが見つからなかったというメッセージのテキストを提供します。

System_CAPS_pubproperty TotalPagesToolTip

[総ページ数] 項目のツールヒント テキストを提供します。

System_CAPS_pubproperty TrueValueText

true の値のテキストを提供します。

System_CAPS_pubproperty UserNamePrompt

ユーザー名のプロンプトのテキストを提供します。

System_CAPS_pubproperty ViewReportButtonText

[レポートの表示] ボタンのテキストを提供します。

System_CAPS_pubproperty ViewReportButtonToolTip

[レポートの表示] ボタンのツールヒント テキストを提供します。

System_CAPS_pubproperty ZoomControlToolTip

[ズーム] コントロールのツールヒント テキストを提供します。

System_CAPS_pubproperty ZoomMenuItemText

[ズーム] メニュー項目のテキストを提供します。

System_CAPS_pubproperty ZoomToPageWidth

[ズーム] - [ページの幅] オプションのテキストを指定します。

System_CAPS_pubproperty ZoomToWholePage

[ズーム] - [ページ全体] 項目のテキストを指定します。

解説

IReportViewerMessages インターフェイスを実装すると、ReportViewer コントロール ユーザー インターフェイスをカスタム ローカライズできます。ReportViewer コントロールの Messages プロパティを設定することで、この実装を ReportViewer コントロールに渡すことができます。

注意

IReportViewerMessages インターフェイスでは、ローカルまたはサーバー レポート処理のエラー メッセージをカスタマイズできません。

プロパティに対して null 文字列値が返された場合、ReportViewer コントロールでは、そのアイテムの元のユーザー インターフェイス文字列が表示されます。

次のコード例では、IReportViewerMessages の実装が ReportViewer コントロールに渡されます。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Reporting.WinForms;
using System.Diagnostics;

namespace MySample
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            CCustomMessageClass myMessageClass = new CCustomMessageClass();

            reportViewer1.Messages = myMessageClass;

            this.reportViewer1.RefreshReport();

         }
    }

    public class CCustomMessageClass : IReportViewerMessages
    {

        #region IReportViewerMessages Members

        public string BackButtonToolTip
        {
            get { return ("BackButtonToolTip here."); }
        }

        public string BackMenuItemText
        {
            get { return("Add your custom text here."); }
        }

        public string ChangeCredentialsText
        {
            get { return("Add your custom text here."); }
        }

        public string CurrentPageTextBoxToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string DocumentMapButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string DocumentMapMenuItemText
        {
            get { return("Add your custom text here."); }
        }

        public string ExportButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string ExportMenuItemText
        {
            get { return("Add your custom text here."); }
        }

        public string FalseValueText
        {
            get { return("Add your custom text here."); }
        }

        public string FindButtonText
        {
            get { return("Add your custom text here."); }
        }

        public string FindButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string FindNextButtonText
        {
            get { return("Add your custom text here."); }
        }

        public string FindNextButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string FirstPageButtonToolTip
        {
            get { return("Custom first page tool tip"); }
        }

        public string LastPageButtonToolTip
        {
            get { return(null); }
        }

        public string NextPageButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string NoMoreMatches
        {
            get { return("Add your custom text here."); }
        }

        public string NullCheckBoxText
        {
            get { return("Add your custom text here."); }
        }

        public string NullCheckBoxToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string NullValueText
        {
            get { return("Add your custom text here."); }
        }

        public string PageOf
        {
            get { return("Add your custom text here."); }
        }

        public string PageSetupButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string PageSetupMenuItemText
        {
            get { return("Add your custom text here."); }
        }

        public string ParameterAreaButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string PasswordPrompt
        {
            get { return("Add your custom text here."); }
        }

        public string PreviousPageButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string PrintButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string PrintLayoutButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string PrintLayoutMenuItemText
        {
            get { return("Add your custom text here."); }
        }

        public string PrintMenuItemText
        {
            get { return("Add your custom text here."); }
        }

        public string ProgressText
        {
            get { return("Add your custom text here."); }
        }

        public string RefreshButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string RefreshMenuItemText
        {
            get { return("Add your custom text here."); }
        }

        public string SearchTextBoxToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string SelectAValue
        {
            get { return("Add your custom text here."); }
        }

        public string SelectAll
        {
            get { return("Add your custom text here."); }
        }

        public string StopButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string StopMenuItemText
        {
            get { return("Add your custom text here."); }
        }

        public string TextNotFound
        {
            get { return("Add your custom text here."); }
        }

        public string TotalPagesToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string TrueValueText
        {
            get { return("Add your custom text here."); }
        }

        public string UserNamePrompt
        {
            get { return("Add your custom text here."); }
        }

        public string ViewReportButtonText
        {
            get { return("Add your custom text here."); }
        }

        public string ViewReportButtonToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string ZoomControlToolTip
        {
            get { return("Add your custom text here."); }
        }

        public string ZoomMenuItemText
        {
            get { return("Add your custom text here."); }
        }

        public string ZoomToPageWidth
        {
            get { return("Add your custom text here."); }
        }

        public string ZoomToWholePage
        {
            get { return("Add your custom text here."); }
        }

        #endregion
    }
}

参照

Microsoft.Reporting.WinForms 名前空間

トップに戻る