ReportViewer datepicker week start

888 views Asked by At

We have an web application in C# in where we have multiple pages with reportviewer controls, and almost all of them have date parameters.

That date parameters are rendering a datepicker (everything it's fine till this point, no exceptions, no problems) but all the datepickers starts on Sunday ("domingo" in spanish, "do" abbreviated) and our client complains about it; he wants it to start on monday ("lunes" in spanish, "lu" abbreviated). Image 1

Accessing the same reports from reportserver works fine, all the datepickers starts on monday("lu") and it works fine:

Image 2

I've checked that user's Culture and CultureUI it's correct (es-ES for spanish culture); and i think that's working fine cause today's text and day names are properly translated...

I've Googled it and i have only found that if you change DATEFIRST in SQL it must be solved; but it doesn't.

Can anyone give me a clue or any solution?

I know that i can use my own parameter selectors and call the reportViewer only to load the report with the parameters, but this solution will take a long time and we prefer to avoid that solution.

I've also read that with Reflection i can access the Datepicker class inside Microsoft.Reporting and change it to start on monday; but it's not a "nice" solution and it's really complex.

1

There are 1 answers

3
Trubs On

I've had similar trouble with date-format on the client. The doco says that it should determined by the Language of the report, so set that to the language of the client (see below). You could even be more specific and set the language to es-ES

enter image description here

But I've found this approach does not always work. (for me at least). Once the report is set up like this, changing the client locale, should change the date format (and start day of week).

At one point changing the locale of the SSRS server had the desired effect (but this is a pretty sweeping change)