We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to localize the report content?

Platform: WPF |
Control: ReportViewer |
.NET Framework: 4.5.1

This article explains how to localize the report contents. The report contents can be localized using the following two ways.

1. Use Code class expressions instead of static texts in report item values to display them based on culture. To add custom codes in a report, do the following.

a)In Design view, right-click the design surface outside the border of the report and click Report Properties.

b)Click Code.

c)In Custom code, type the code. Errors in the code produce warnings when the report runs. The following example creates a custom function named Change Word that replaces the word "bike" with "bicycle".

Public Function ChangeWord(ByVal s As String) As String
   Dim strBuilder As New System.Text.StringBuilder(s)
   If s.Contains("Ito") Then
      strBuilder.Replace("bike", "bicycle")
      Return strBuilder.ToString()
      Else: Return s
   End If
End Function

d)The following example shows how to pass a dataset field named Category to this function in an expression:


2. Set Language property in Text Box Report item to display the textbox numeric, date time values in current culture.

In report Design view, select the text box to which you want to apply locale settings and in the Properties pane, do the following:

  1. For the Calendar property, type or select the calendar that you want to use for dates.
  2. For the Direction property, type or select the direction in which the text is written.
  3. For the Language property, type or select the language that you want to use for the text box. This value overrides the Language property for the Report.
  4. For the Numeral Language property, type or select the format to use for numbers in the text box.
  5. For the Numeral Variant property, type or select the variant of the format to use for numbers in the text box.
  6. For the Unicode Bidi property, select the level of bidirectional embedding to use in the text box.

Sample Link:





2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile