ReportViewer changing CultureInfo?

Answered ReportViewer changing CultureInfo?

  • lundi 26 juillet 2010 16:15
     
     

    I have created a windows form in .NET 4.0 which dynamically loads reports into a ReportViewer. However after certain reports are loaded my current threads culture info changes to "en-US" (System.Threading.Thread.CurrentThread.CurrentCulture). Is there any reason for this?

    PS This seems to be happening after the report has rendered on the screen.

Toutes les réponses

  • mardi 27 juillet 2010 14:59
     
     
    I have done some more digging and it is definately the ReportViewer rendering that is causing the problem. I have created a work around using the RenderingBegin and RenderingComplete events to store the curent culture and reapply it post render. Is there anything in a report that can cause the culture to change (it isn't happening on all reports and I'm yet to find an obvious reason)?
  • jeudi 29 juillet 2010 19:34
     
     

    I've tried to repro this locally but haven't had any luck so far, can you provide a little more information about the reports that are causing the issue such as what kind of data regions are on the report (Chart, Gauge, Tablix ...). Also are you able to create an isolated repro of the issue?

    Matt M.


    This posting is provided "AS IS" with no warranties, and confers no rights

  • mercredi 4 août 2010 13:19
     
     
    Done some more digging and this issue only occurs on reports with a document map.
  • mercredi 4 août 2010 18:03
     
     Traitée

    Thanks for doing the extra investigation I am now able to repro the problem and it does appear to be a bug in the control. Please file a bug on connect https://connect.microsoft.com so you can track the progress of this issue. Thanks!

    Matt M.


    This posting is provided "AS IS" with no warranties, and confers no rights

     

    • Marqué comme réponse Rex Runti jeudi 5 août 2010 09:14
    •  
  • jeudi 5 août 2010 09:14
     
     
    Bug report filed
  • vendredi 10 décembre 2010 09:27
     
     
    can you please post link to bug report? i have same problem
  • lundi 9 mai 2011 14:31
     
     

    Hi,

    Any update on this issue please ?

    Would you mind giving us the link to track the bug on the Microsoft Connect website please ?

    Thank you.

  • lundi 23 avril 2012 18:52
     
     
    i have searched for this bug with no success, i have the same problem.

    Virginia

  • jeudi 31 janvier 2013 11:43
     
      A du code

    This has been fixed in the dll versions of Microsoft.ReportViewer that come with Visual Studio 2010, version 10.0.40219.329.

    I've successfully reproduced the thread culture change error with the dlls version 10.0.30319.1. The offending call was to 

    Microsoft.Reporting.WinForms.Render(renderExtension, nullout mimeType, out encoding, out extension, out streams, out warnings);

    The dlls involved are:

    Microsoft.ReportViewer.Common.dll

    Microsoft.ReportViewer.DataVisualization.dll

    Microsoft.ReportViewer.ProcessingObjectModel.dll

    Microsoft.ReportViewer.WebForms.dll

    Microsoft.ReportViewer.WinForms.dll

    These were installed with the Microsoft Report Viewer 2010 redistributable, at some point, on the problem machine. So examine your references and the GAC, you might find the error there, or be sure to restore the old culture after rendering anything report related.