ReportViewer.Messages 속성

ReportViewer 컨트롤에 사용할 사용자 지정 메시지를 포함하는 개체를 가져오거나 설정합니다.

네임스페이스:  Microsoft.Reporting.WinForms
어셈블리:  Microsoft.ReportViewer.WinForms(Microsoft.ReportViewer.WinForms.dll)

구문

‘선언
<BrowsableAttribute(False)> _
Public Property Messages As IReportViewerMessages
    Get
    Set
‘사용 방법
Dim instance As ReportViewer
Dim value As IReportViewerMessages

value = instance.Messages

instance.Messages = value
[BrowsableAttribute(false)]
public IReportViewerMessages Messages { get; set; }
[BrowsableAttribute(false)]
public:
property IReportViewerMessages^ Messages {
    IReportViewerMessages^ get ();
    void set (IReportViewerMessages^ value);
}
[<BrowsableAttribute(false)>]
member Messages : IReportViewerMessages with get, set
function get Messages () : IReportViewerMessages
function set Messages (value : IReportViewerMessages)

속성 값

유형: Microsoft.Reporting.WinForms.IReportViewerMessages
IReportViewerMessages 인터페이스를 구현하는 개체

주의

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
    }

}

참고 항목

참조

ReportViewer 클래스

Microsoft.Reporting.WinForms 네임스페이스