This is a migrated thread and some comments may be shown as answers.

Translate default text for boolean fields

1 Answer 157 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mário Alessand Gonçalves Oliveira
Top achievements
Rank 1
Mário Alessand Gonçalves Oliveira asked on 02 Aug 2010, 07:59 PM
Hi there!

On my project I have lots of report files, on which I bind a list of objects. One of the properties from these objects is a boolean field, which gives me as output the text "true" or "false".

I woundn´t like to use expressions, neither itemdatabound event, cause it would lead me to a herculeous work, since I have more than two hundred reports in this project.

Is here a way to set the boolean fields to get their text from a resource (resx) file instead of "true" and "false"?

btw, I´m already using the file Telerik.ReportViewer.WebForms.Resources.pt-BR.resx, but it only translates the interface itens, not the data.

Best regards,

1 Answer, 1 is accepted

Sort by
-1
Svetoslav
Telerik team
answered on 04 Aug 2010, 06:01 PM
Hi Mário Alessand Gonçalves Oliveira,

By using external RESX files you can localize only the ReportViewer's UI but not the data. For more information please check Report Viewer Localization help topic.

As far as the data is concerned the Telerik's reporting engine displays it according to its type (and corresponding string representation - that is the result of the System.Object.ToString() method and format if in a TextBox item.

So in case you don't want to use an expression or binding event to modify the data a possible solution is to modify the data before the report. For example you may replace the boolean field with a text field that contains the proper string you need to display in your reports. The new field should have the same identifier as the boolean field in order to keep your reports intact.

Best wishes,
Svetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Mário Alessand Gonçalves Oliveira
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Share this question
or