Formatting Value in Chart for a specific Culture

Stimulsoft Reports.NET discussion
Post Reply
Saus86
Posts: 62
Joined: Fri Mar 23, 2012 10:57 am
Location: Italy

Formatting Value in Chart for a specific Culture

Post by Saus86 »

Hi.

I am using a chart for view a list of costs. I have seen that i can set the format property with "C2" for view the numeric value in mode "cost".
Is possibile to format values for a specific Culture? At the moment, using "C2" i can only view values in €.

I have tried to set list values in event "GetListOfValues" in this mode but not function:

Code: Select all


//GLOBALIZATION

// Creates a CultureInfo
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(""+this["cultureName"]);   
double val = 70100200.5;

e.Value = "....<other values separated by ;>...."+val.ToString("c", ci);
Is possibile do it???

Than you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Formatting Value in Chart for a specific Culture

Post by HighAley »

Hello.

There is a Culture property of the report that show be set.
We will make an improvement to this property affect chart formatting too.

Thank you.
Saus86
Posts: 62
Joined: Fri Mar 23, 2012 10:57 am
Location: Italy

Re: Formatting Value in Chart for a specific Culture

Post by Saus86 »

I have found this way:

in the event BeginRender i have inserted:

Code: Select all

Application.CurrentCulture = new System.Globalization.CultureInfo(<stringcultureName>);
In this mode the values in chart are formatted automatically and also datanumeric and datatimes in other parts of report. Yeah!!!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Formatting Value in Chart for a specific Culture

Post by HighAley »

Hello.

Great!
Whatever we will make an improvement in our next prerelease build.

Thank you.
Post Reply