允许应用程序提供自定义的用户界面消息。
命名空间: Microsoft.Reporting.WinForms
程序集: Microsoft.ReportViewer.WinForms(在 Microsoft.ReportViewer.WinForms.dll 中)
语法
声明
Public Interface IReportViewerMessages
用法
Dim instance As IReportViewerMessages
public interface IReportViewerMessages
public interface class IReportViewerMessages
type IReportViewerMessages = interface end
public interface IReportViewerMessages
IReportViewerMessages 类型公开以下成员。
属性
名称 | 说明 | |
---|---|---|
![]() |
BackButtonToolTip | 提供“上一步”按钮的工具提示文本。 |
![]() |
BackMenuItemText | 提供“上一步”菜单项的文本。 |
![]() |
ChangeCredentialsText | 为“更改凭据”按钮提供文本。 |
![]() |
CurrentPageTextBoxToolTip | 为“当前页”文本框提供工具提示文本。 |
![]() |
DocumentMapButtonToolTip | 为“文档结构图”按钮提供工具提示文本。 |
![]() |
DocumentMapMenuItemText | 提供“文档结构图”菜单项的文本。 |
![]() |
ExportButtonToolTip | 提供“导出”按钮的工具提示文本。 |
![]() |
ExportMenuItemText | 提供“导出”菜单项的文本。 |
![]() |
FalseValueText | 提供 false 值的文本。 |
![]() |
FindButtonText | 提供“查找”按钮的文本。 |
![]() |
FindButtonToolTip | 提供“查找”按钮的工具提示文本。 |
![]() |
FindNextButtonText | 提供“查找下一个”按钮的文本。 |
![]() |
FindNextButtonToolTip | 提供“查找下一个”按钮的工具提示文本。 |
![]() |
FirstPageButtonToolTip | 提供“首页”按钮的工具提示文本。 |
![]() |
LastPageButtonToolTip | 提供“最后一页”按钮的工具提示文本。 |
![]() |
NextPageButtonToolTip | 提供“下一页”按钮的工具提示文本。 |
![]() |
NoMoreMatches | 提供没有其他匹配项的消息的文本。 |
![]() |
NullCheckBoxText | 提供 Null 复选框的文本。 |
![]() |
NullCheckBoxToolTip | 提供“Null”复选框的工具提示文本。 |
![]() |
NullValueText | 提供 nullnull 引用(在 Visual Basic 中为 Nothing) 值的文本。 |
![]() |
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 接口不允许对本地报表或服务器报表处理错误消息进行自定义。 |
返回属性的 nullnull 引用(在 Visual Basic 中为 Nothing) 字符串值将使 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
}
}