Each of the following objects has a public Culture property that allows you to define how ActiveReports formats data when the OutputFormat is set to D (date), C (currency), or other .NET format specifiers.
Note: The default value for the Culture property is (default, inherit). For the ActiveReport object, this is the culture of the current thread. For the TextBox and ChartControl, this is the culture of the ActiveReport object. |
At design time, you can set the globalization culture in the Visual Studio Properties grid.
To localize an ActiveReport at design time
To localize a TextBox at design time
To localize a Chart at design time
You can also specify a culture in code. For a list of System.Globalization culture codes, see Cultures.
To localize an ActiveReport at run time
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste INSIDE the ReportStart event. |
Copy Code |
---|---|
MyReport.Culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US") |
To write the code in C#
C# code. Paste INSIDE the ReportStart event. |
Copy Code |
---|---|
MyReport.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 |
---|---|
TextBox1.Culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US") |
To write the code in C#
C# code. Paste INSIDE the Format event. |
Copy Code |
---|---|
textBox1.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 |
---|---|
ChartControl1.Culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US") |
To write the code in C#
C# code. Paste INSIDE the Format event. |
Copy Code |
---|---|
chartControl1.Culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); |