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 控制項。

System_CAPS_note注意事項

IReportViewerMessages 介面不允許自訂本機或伺服器報表處理錯誤訊息。

針對屬性傳回 null 字串值時,將會造成 ReportViewer 控制項顯示該項目的原始使用者介面字串。

範例

下列程式碼範例會示範傳遞給 ReportViewer 控制項的 IReportViewerMessages 實作。

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 命名空間

回到頁首