In a section layout report, the Report object, TextBox control, and Chart control have a public Culture property that allows you to localize data when the OutputFormat property is set to D (date), C (currency), or other .NET formats.
In a page layout report, the Report object, TextBox control, and Chart control all have a Language property that works in the same way. The default value for the Language property is Default, which is the culture of the current thread.
At design time, you can set the culture or language in the Visual Studio Properties window.
To localize a Report at design time
To localize a TextBox control at design time
To localize a Chart control at design time
You can also specify a culture in code for section reports. For a list of System.Globalization culture codes, see Cultures.
To localize a Report at run time
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste INSIDE the ReportStart event. |
Copy Code
|
---|---|
YourReportName.Culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US") |
To write the code in C#
C# code. Paste INSIDE the ReportStart event. |
Copy Code
|
---|---|
YourReportName.Culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); |
To localize a TextBox at run time
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste INSIDE the Format event. |
Copy Code
|
---|---|
TextBox.Culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US") |
To write the code in C#
C# code. Paste INSIDE the Format event. |
Copy Code
|
---|---|
textBox.Culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); |
To localize a Chart at run time
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste INSIDE the Format event. |
Copy Code
|
---|---|
ChartControl.Culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US") |
To write the code in C#
C# code. Paste INSIDE the Format event. |
Copy Code
|
---|---|
chartControl.Culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); |