Page 2 of 2

Chart localization problem

Posted: Thu May 20, 2010 4:00 am
by sbaxter
Hello again,

I made some tests to see the difference with the RenderChartAsBitmap setting. The files were obtained directly from the webviewer using the save button in the toolbar.

Results of chart localization with "StiOptions.Engine.RenderChartAsBitmap = false;"

WebViewer: Fail
Pdf: OK (WebViewer fail but saving as pdf works?)
Jpeg: OK
Bmp: OK
Png: OK
Word2007: Fail
Excel: Fail
Excel2007: Fail
PowerPoint: Fail
Html: The image of the chart is not saved with the html, makes reference to the website?


Results of chart localization with "StiOptions.Engine.RenderChartAsBitmap = true;"

WebViewer: OK
Pdf: OK (image very blurry)
Jpeg: OK (image very blurry)
Bmp: OK (image very blurry)
Png: OK (image very blurry)
Word2007: OK (image very blurry)
Excel: OK (image very blurry)
Excel2007: OK (image very blurry)
PowerPoint: OK (image very blurry)
Html: The image of the chart is not saved with the html, makes reference to the website?

I hope this could help you to find the problem.

Regards,

Scott.

Chart localization problem

Posted: Thu May 20, 2010 7:01 am
by Vladimir
Hello, Scott

Where in the code you change the current culture? It must be changed in overridden method InitializeCulture, as shown below:

Code: Select all

protected override void InitializeCulture()
{
    string language = "es-ES";
    Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(language);
    Thread.CurrentThread.CurrentUICulture = new CultureInfo(language);
    
    base.InitializeCulture();
}
Thank you.

Chart localization problem

Posted: Thu May 20, 2010 12:41 pm
by sbaxter
Hello Vladimir,

I tryied that but without a luck. Is the WebViewer who format the data of the chart depending of the current culture of the asp thread or is formatted when the data is assigned to the StiReport?

Also, I tryed setting the thread culture in several places to "es-ES" directly, but the chart refuses to format the values. I confirm that the thread of the asp is in spanish.

I tryied too creating a databand below the chart to show the values of the chart in the texts, and they are formatted correctly but not in the chart.

Anyway, why the webviewer shows the values in the chart in one format and saving to pdf works perfectly? Is not using the same culture?

Regards,

Scott.

Chart localization problem

Posted: Sun May 23, 2010 5:10 pm
by Ivan
Hello,

In the next prerelease build the new static property StiOptions.Export.Html.ForcedCultureForCharts will be added.
By default this property is set to null.
Please set this property to the desired culture, and this culture will be used instead of current culture.

Thank you.

Chart localization problem

Posted: Mon Jun 14, 2010 11:53 am
by sbaxter
Works like a charm!!

Regards,

Scott.

Chart localization problem

Posted: Mon Jun 14, 2010 2:06 pm
by Andrew
Perfect!