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
屬性
名稱 | 描述 | |
---|---|---|
BackButtonToolTip | 提供 [上一步] 按鈕的工具提示文字。 |
|
BackMenuItemText | 提供 [上一步] 功能表項目的文字。 |
|
ChangeCredentialsText | 提供 [變更認證] 按鈕的文字。 |
|
CurrentPageTextBoxToolTip | 提供 [目前的頁面] 文字方塊的工具提示文字。 |
|
DocumentMapButtonToolTip | 提供 [文件引導模式] 按鈕的工具提示文字。 |
|
DocumentMapMenuItemText | 提供 [文件引導模式] 功能表項目的文字。 |
|
ExportButtonToolTip | 提供 [匯出] 按鈕的工具提示文字。 |
|
ExportMenuItemText | 提供 [匯出] 功能表項目的文字。 |
|
FalseValueText | 提供 false 值的文字。 |
|
FindButtonText | 提供 [尋找] 按鈕的文字。 |
|
FindButtonToolTip | 提供 [尋找] 按鈕的工具提示文字。 |
|
FindNextButtonText | 提供 [尋找下一個] 按鈕的文字。 |
|
FindNextButtonToolTip | 提供 [尋找下一個] 按鈕的工具提示文字。 |
|
FirstPageButtonToolTip | 提供 [第一頁] 按鈕的工具提示文字。 |
|
LastPageButtonToolTip | 提供 [最後一頁] 按鈕的工具提示文字。 |
|
NextPageButtonToolTip | 提供 [下一頁] 按鈕的工具提示文字。 |
|
NoMoreMatches | 提供無其他相符項目之訊息的文字。 |
|
NullCheckBoxText | 提供 [Null] 核取方塊的文字。 |
|
NullCheckBoxToolTip | 提供 [Null] 核取方塊的工具提示文字。 |
|
NullValueText | 提供 Null 值的文字。 |
|
PageOf | 提供分頁訊息的文字。 |
|
PageSetupButtonToolTip | 提供 [頁面設定] 按鈕的工具提示文字。 |
|
PageSetupMenuItemText | 提供 [頁面設定] 功能表項目的文字。 |
|
ParameterAreaButtonToolTip | 提供 [參數區域] 按鈕的工具提示文字。 |
|
PasswordPrompt | 提供密碼提示的文字。 |
|
PreviousPageButtonToolTip | 提供 [上一頁] 按鈕的工具提示文字。 |
|
PrintButtonToolTip | 提供 [列印] 按鈕的文字。 |
|
PrintLayoutButtonToolTip | 提供 [列印配置] 按鈕的工具提示文字。 |
|
PrintLayoutMenuItemText | 提供 [列印配置] 功能表項目的文字。 |
|
PrintMenuItemText | 提供 [列印] 功能表項目的文字。 |
|
ProgressText | 提供處理報表時所顯示之進度訊息的文字。 |
|
RefreshButtonToolTip | 提供 [重新整理] 按鈕的工具提示文字。 |
|
RefreshMenuItemText | 提供 [重新整理] 功能表項目的文字。 |
|
SearchTextBoxToolTip | 提供 [搜尋] 文字方塊的工具提示文字。 |
|
SelectAll | 提供多重值下拉式清單方塊中之 [全選] 項目的文字。 |
|
SelectAValue | 提供 [選取值] 提示的文字。 |
|
StopButtonToolTip | 提供 [停止] 按鈕的工具提示文字。 |
|
StopMenuItemText | 提供 [停止] 功能表項目的文字。 |
|
TextNotFound | 提供 [找不到文字] 訊息的文字。 |
|
TotalPagesToolTip | 提供 [總頁數] 項目的工具提示文字。 |
|
TrueValueText | 提供 true 值的文字。 |
|
UserNamePrompt | 提供使用者名稱提示的文字。 |
|
ViewReportButtonText | 提供 [檢視報表] 按鈕的文字。 |
|
ViewReportButtonToolTip | 提供 [檢視報表] 按鈕的工具提示文字。 |
|
ZoomControlToolTip | 提供 [縮放] 控制項的工具提示文字。 |
|
ZoomMenuItemText | 提供 [縮放] 功能表項目的文字。 |
|
ZoomToPageWidth | 提供 [縮放至頁寬] 選項的文字。 |
|
ZoomToWholePage | 提供 [縮放至全頁] 項目的文字。 |
備註
您可以實作 IReportViewerMessages 介面,以提供 ReportViewer 控制項使用者介面的自訂當地語系化。可以藉由設定 ReportViewer 控制項的 Messages 屬性,將這個實作傳遞給 ReportViewer 控制項。
注意事項 |
---|
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 命名空間
回到頁首