IReportViewerMessages Interface接口

18 篇文章 1 订阅

https://docs.microsoft.com/zh-cn/previous-versions/ms255036(v=vs.140)

发布时间: 2016年7月

允许应用程序提供自定义的用户界面消息。

命名空间:   Microsoft.Reporting.WinForms
程序集:  Microsoft.ReportViewer.WinForms(Microsoft.ReportViewer.WinForms.dll 中)

语法

C#复制

public interface IReportViewerMessages

属性

 名称说明
System_CAPS_pubpropertyBackButtonToolTip

提供“上一步”按钮的工具提示文本。

System_CAPS_pubpropertyBackMenuItemText

提供“上一步”菜单项的文本。

System_CAPS_pubpropertyChangeCredentialsText

为“更改凭据”按钮提供文本。

System_CAPS_pubpropertyCurrentPageTextBoxToolTip

为“当前页”文本框提供工具提示文本。

System_CAPS_pubpropertyDocumentMapButtonToolTip

为“文档结构图”按钮提供工具提示文本。

System_CAPS_pubpropertyDocumentMapMenuItemText

提供“文档结构图”菜单项的文本。

System_CAPS_pubpropertyExportButtonToolTip

提供“导出”按钮的工具提示文本。

System_CAPS_pubpropertyExportMenuItemText

提供“导出”菜单项的文本。

System_CAPS_pubpropertyFalseValueText

提供 false 值的文本。

System_CAPS_pubpropertyFindButtonText

提供“查找”按钮的文本。

System_CAPS_pubpropertyFindButtonToolTip

提供“查找”按钮的工具提示文本。

System_CAPS_pubpropertyFindNextButtonText

提供“查找下一个”按钮的文本。

System_CAPS_pubpropertyFindNextButtonToolTip

提供“查找下一个”按钮的工具提示文本。

System_CAPS_pubpropertyFirstPageButtonToolTip

提供“首页”按钮的工具提示文本。

System_CAPS_pubpropertyLastPageButtonToolTip

提供“最后一页”按钮的工具提示文本。

System_CAPS_pubpropertyNextPageButtonToolTip

提供“下一页”按钮的工具提示文本。

System_CAPS_pubpropertyNoMoreMatches

提供没有其他匹配项的消息的文本。

System_CAPS_pubpropertyNullCheckBoxText

提供 Null 复选框的文本。

System_CAPS_pubpropertyNullCheckBoxToolTip

提供“Null”复选框的工具提示文本。

System_CAPS_pubpropertyNullValueText

提供 null 值的文本。

System_CAPS_pubpropertyPageOf

提供分页消息的文本。

System_CAPS_pubpropertyPageSetupButtonToolTip

提供“页面设置”按钮的工具提示文本。

System_CAPS_pubpropertyPageSetupMenuItemText

提供“页面设置”菜单项的文本。

System_CAPS_pubpropertyParameterAreaButtonToolTip

提供“参数区域”按钮的工具提示文本。

System_CAPS_pubpropertyPasswordPrompt

提供密码提示的文本。

System_CAPS_pubpropertyPreviousPageButtonToolTip

提供“上一页”按钮的工具提示文本。

System_CAPS_pubpropertyPrintButtonToolTip

提供“打印”按钮的文本。

System_CAPS_pubpropertyPrintLayoutButtonToolTip

提供“打印布局”按钮的工具提示文本。

System_CAPS_pubpropertyPrintLayoutMenuItemText

提供“打印布局”菜单项的文本。

System_CAPS_pubpropertyPrintMenuItemText

提供“打印”菜单项的文本。

System_CAPS_pubpropertyProgressText

提供在处理报表时显示的进度消息的文本。

System_CAPS_pubpropertyRefreshButtonToolTip

提供“刷新”按钮的工具提示文本。

System_CAPS_pubpropertyRefreshMenuItemText

提供“刷新”菜单项的文本。

System_CAPS_pubpropertySearchTextBoxToolTip

提供“搜索”文本框的工具提示文本。

System_CAPS_pubpropertySelectAll

提供多值下拉列表框中的“全选”项的文本。

System_CAPS_pubpropertySelectAValue

提供“选择一个值”提示的文本。

System_CAPS_pubpropertyStopButtonToolTip

提供“停止”按钮的工具提示文本。

System_CAPS_pubpropertyStopMenuItemText

提供“停止”菜单项的文本。

System_CAPS_pubpropertyTextNotFound

提供“未找到文本”消息的文本。

System_CAPS_pubpropertyTotalPagesToolTip

提供“全部页”项的工具提示文本。

System_CAPS_pubpropertyTrueValueText

提供 true 值的文本。

System_CAPS_pubpropertyUserNamePrompt

提供用户名提示的文本。

System_CAPS_pubpropertyViewReportButtonText

提供“查看报表”按钮的文本。

System_CAPS_pubpropertyViewReportButtonToolTip

提供“查看报表”按钮的工具提示文本。

System_CAPS_pubpropertyZoomControlToolTip

提供“缩放”控件的工具提示文本。

System_CAPS_pubpropertyZoomMenuItemText

提供“缩放”菜单项的文本。

System_CAPS_pubpropertyZoomToPageWidth

提供“缩放到页宽”选项的文本。

System_CAPS_pubpropertyZoomToWholePage

提供“缩放到整页”项的文本。

备注

您可以实现 IReportViewerMessages 接口,以提供 ReportViewer 控件用户界面的自定义本地化。可以通过设置 ReportViewer 控件的 Messages 属性将此实现传递到 ReportViewer 控件。

 备注

IReportViewerMessages 接口不允许对本地报表或服务器报表处理错误消息进行自定义。

返回属性的 null 字符串值将使 ReportViewer 控件显示该项的原始用户界面字符串。

示例

下面的代码示例演示传递到 ReportViewer 控件的 IReportViewerMessages 的实现。

C#复制

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

返回页首

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值