![]() |
Desktop Development »
Printing »
General
Intermediate
License: The Code Project Open License (CPOL)
Customizing and Localizing Microsoft ReportViewer .NET - An exact solutionBy yincekaraAn article about How to Customizing and Localizing Microsoft ReportViewer Toolbar |
C#, Windows, .NET, Visual Studio, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||

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...
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;
...
...
}
}
}
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";
...
}
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.
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.
| You must Sign In to use this message board. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 11 Feb 2007 Editor: Paul Conrad |
Copyright 2007 by yincekara Everything else Copyright © CodeProject, 1999-2009 Web21 | Advertise on the Code Project |