Click here to Skip to main content
Licence CPOL
First Posted 11 Feb 2007
Views 72,730
Downloads 1,198
Bookmarked 47 times

Customizing and Localizing Microsoft ReportViewer .NET - An exact solution

By yincekara | 11 Feb 2007
An article about How to Customizing and Localizing Microsoft ReportViewer Toolbar

1

2

3
3 votes, 23.1%
4
10 votes, 76.9%
5
4.68/5 - 13 votes
μ 4.65, σa 0.68 [?]

ReportViewer Toolbar

Introduction

In my last article I've mentioned about a workaround that you may use in case of if you don't want to use Microsoft Reportviewer component's internal toolbar. In this article I'm telling the way that if you want to use your own toolbar component (like Infragistics etc. ), simply hide internal toolbar and use your own toolbar and implement methods by yourself. You can reach this article here.

After I post this article some developers send some comments about what do they need to do if they want to use Microsoft's own toolbar but if they want to localize it. So I decided to write a new article about it. And Jan de Groot send me a great idea and working code about this and wanted me to write this article. I appreciate him for both his help and being so kind...

Localizing Reportviewer Component to Turkish

What you need to to is : Create a new class and derive it from IReportViewerMessages and set messages into your specified custom language.

public class CustomReportViewerMessages:IReportViewerMessages
{
    public CustomReportViewerMessages(IReportViewerMessages 
                                    reportViewerMessages)
    {
        this.InitializeMessages(reportViewerMessages);
        if (reportViewerMessages != null)
        {
            this.backButtonToolTip = reportViewerMessages
                                     .BackButtonToolTip;
            this.backMenuItemText = reportViewerMessages
                                    .BackMenuItemText;
            ...
            ...
        }
    }
}

More Resources about RDL

Background

Create a message class and customize it 's messages as you wish and use it on reportviewer.

private void customizeMessages()
{
    this.customMessages = new CustomReportViewerMessages(
                              this.reportViewer.Messages);
    this.customMessages.FindButtonText = "Bul";
    this.customMessages.FindButtonToolTip = 
                                    "Girilen metni bul";
    ...
}

Using the code

You can simply call your customization method after you set report path:

public ReportViewerForm()
{
    InitializeComponent();
    customizeMessages();
}

In the source code project there are also some extra buttons on the toolstrip. For full implementation see the source file above.

Conclusion

Microsoft ReportViewer is a powerful component to display your report and RDL is a good way to implement reporting features. I believe that in near future, many RDL designer tools and RDL viewer tools will be available on the market.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

yincekara

Software Developer (Senior)
MikroKom Yazilim A.S.
Turkey Turkey

Member
c# , vb6 , mssql , oracle , mysql , asp , asp.net developer.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralAdding spell check functionality to reportviewer PinmemberMember 282711521:39 23 Oct '08  
GeneralThanks Pinmemberrigster13:37 2 Jun '08  
QuestionImplement IReportViewerMessages with vb.net PinmemberMiguel Matos1:13 20 Apr '07  
AnswerRe: Implement IReportViewerMessages with vb.net Pinmemberyincekara4:39 20 Apr '07  
AnswerRe: Implement IReportViewerMessages with vb.net PinmemberMiguel Matos8:25 20 Apr '07  
Generalthank you PinmemberMaksi2:55 21 Feb '07  
QuestionIs there any method to hide document map PinmemberMember #115743113:58 14 Feb '07  
AnswerRe: Is there any method to hide document map Pinmemberpolymorphism3:08 21 Feb '07  
GeneralRe: Is there any method to hide document map Pinmembermaynardflies6:19 9 May '08  
GeneralLocalization not working Pinmemberjok3r19852:03 13 Feb '07  
GeneralRe: Localization not working Pinmemberpolymorphism2:15 13 Feb '07  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120210.1 | Last Updated 11 Feb 2007
Article Copyright 2007 by yincekara
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid