ReportViewer datetime parameter control affected by Regional Settings RRS feed

  • Question

  • I have a Windows Form which is used to display SSRS reports by displaying them in a Microsoft.Reporting.WinForms.ReportViewer control. Our application is  targeting the .NET 4 Client Profile. It was written in C#. Using Visual Studio 2013 Professional.

    Here are my file versions for dlls that contain the ReportViewer classes:

    Microsoft.ReportViewer.Common is version, runtime version v2.0.50727


    Microsoft.ReportViewer.WinForms is version, runtime version v2.0.50727


    I have a SSRS report that accepts two datetime parameters.

    The ReportViewer control is set to process this remote report and show the parameters to the user.

    On load of our Windows Form application we do set the CurrentUICulture equal to either "en-CA" for English Canada or "fr-CA" for French Canada.

    My regional settings on my computer are set to English (Canada) with a short and long date format of "yyyy-MM-dd". 

    The error or situation that occurs:

    1) the report loads showing the datetime parameter fields

    2) I choose Sept. 1, 2014 from the 1st calendar picker and the controls displays: 2014-09-01

    3) I then choose Sept. 26, 2014 from the 2nd calendar picker and the controls displays: 2014-09-25.

    This is what I expected, but

    4) I click the View Report button

    5) then the report executes on the SSRS server, the data comes back, but

    the 1st calendar picker now displays: 2014-01-09 and 

    the 2nd calendar picker now displays nothing in the field.

    PLEASE can some explain to me why this is happening????

    Note: If I switch the Regional Settings on my computer back to English (United States) and set the short and long date formats to "yyyy-MM-dd", run the same steps as above, the dates fields are fine and there is no problem.

    Here is the images that demonstrate:

    • Moved by Carl Cai Monday, September 29, 2014 1:37 AM more related
    Friday, September 26, 2014 12:29 PM

All replies

  • Hi,

    me personally, I use a custom dialog for the parameters, and feed them in code to the report.

    Do you change the CurrentCulture also? That is the one you need to change if you want other date and time formats. (there's CurrentUICulture and CurrentCulture)

    Regards, Nico

    Friday, September 26, 2014 1:17 PM
  • No we are not setting the CurrentCulture. I just changed the code, rebuilt and tried again.

    Didn't make any difference to the situation I'm experiencing. Tks for trying though.

    Friday, September 26, 2014 1:31 PM
  • Hi,

    another thing you could try is opening the report in design view, select the report itself, goto properties and set the language property to: User!Language

    Regards, Nico

    • Proposed as answer by Carl Cai Monday, September 29, 2014 1:38 AM
    Friday, September 26, 2014 1:47 PM
  • The report was created to deploy to a SQL Server Reporting Services Server. I tried what you said but the report only allows the 5 character code for the culture, i.e. en-CA or fr-CA.
    Friday, September 26, 2014 6:23 PM
  • there's also the option to have an expression; in the expression editor, you can select in special fields (if i remember correctly) 
    = User!Language

    Regards, Nico

    • Proposed as answer by Carl Cai Monday, September 29, 2014 1:38 AM
    • Unproposed as answer by Brad Howse Monday, September 29, 2014 6:51 PM
    Saturday, September 27, 2014 11:56 AM
  • Hello,

    Since this an issue which is related to ReportViewer, I have helped you move this thread to the forum which is to discuss reporting functionality including the integrated report designer and viewer controls for adding rich data reports to Windows Forms and ASP.NET applications.

    Thanks for your understanding.



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 29, 2014 1:40 AM
  • Hi Nico,

    Sorry that didn't fix the issue either.


    Monday, September 29, 2014 6:51 PM
  • as a last resort, you could use strings instead of dates, and convert them in code, but then you lose some functionality.

    I think this may be a real issue with ssrs. 
    You may want to report it to microsoft connect, at least, if they allow you to.

    Regards, Nico

    • Edited by Nico Boey Tuesday, September 30, 2014 7:15 AM
    Tuesday, September 30, 2014 7:15 AM