0

I'm using ReportViewer in my WinForms .NET 4.0 application and I would like to display some dates in some chart axis labels. My application will be used in different countries, so I would like to display dates in the default OS culture short format.

My whole application culture is italian at the moment (same as the OS default), but when the report renders, it shows dates in the english short format (M/d/yyyy, italian is dd/MM/yyyy). I tryed to use a string property in my binding objects to calculate date strings at render time, but if I put a breakpoint in this property I notice that the property System.Threading.Thread.CurrentThread.CurrentCulture returns english culture during rendering, not italian culture as in the main application thread.

Is there any way to tell ReportViewer to use the main application thread culture? Is it a ReportViewer bug or am I doing something wrong? Someone is having the same problem?

Thanks in advance

  • Have you checked the current UI culture? sometimes this is different from the current culture.. Oops I didn't see that you checked inside the code, probably won't help – Schwarzie2478 Jul 10 '14 at 07:14
  • Hello Schwarzie, yes I checked also current UI culture but is the same as the current culture. Thanks for your help! – Manuel Massetti Jul 10 '14 at 07:19
  • which version of the viewer do you have, the latest or the default that comes with the first install, it seems some kind of fix was made later on for this: http://social.msdn.microsoft.com/Forums/en-US/d1d3ada6-53fa-4484-8a50-cfec9b13a5b9/reportviewer-changing-cultureinfo?forum=vsreportcontrols – Schwarzie2478 Jul 10 '14 at 07:21
  • I'm working in VS2012 with ReportViewer 2012 (dll version 11.0.2802.16). The fix you found is for ReportViewer 2010, I don't know if there is one also for 2012, I'll check. – Manuel Massetti Jul 10 '14 at 07:32
  • I'll randomly guess that you don't have the Italian language pack installed for ReportViewer so it decides to speak a language that it knows about. – Hans Passant Jul 10 '14 at 15:03

0 Answers0