how i can change format in date and time picker for Reporting services. Currently is always in format dd/MM/yyyy, system date&time format is the same. I want to change date to be in format MM/dd/yyyy
相关问题
- Why does SSRS need to recycle the application doma
- Use multiple ReportItems in one expression in RDLC
- How to delete old subscriptions
- QUERY method of Soap request for SSRS and WCF test
- SSL/wallet error trying to access Oracle DB from S
相关文章
- SQL Server Reporting Services - Set default value
- Get list of reports from SSRS?
- SSRS tablix column CanGrow property for width?
- The report server cannot process the report or sha
- SSRS 2008 report not working with using a stored p
- Dataset with dynamic columns in tablix/matrix
- Bulk uploading images to SSRS
- SQL Server Reporting Services url parameters not w
Necromancing.
Yes, you can actually do that - sort of.
First, notice that SSRS takes the date format from the language that is specified in your browser.
So you could just change the language of your browser.
Obviously, you don't wanna tell each and every of your users to do that (if they have the rights & skills to do so in the first place).
So you pass an additional parameter into your report:
I called it in_sprache (Sprache means language in German, with possible values "DE, "FR", "IT", "EN").
Now you need to change the localization process, by overriding the virtual method "InitializeCulture" in ReportViewer.aspx.
You can find ReportViewer in
e.g.
There you add (in the source-code of the /ReportServer/Pages/ReportViewer.aspx):
This will override how ASP.NET localises, taking the value of the url-parameter in_sprache (in_sprache must be a parameter of your report) instead of the browser-user-language.
Now, unfortunately, you must also override context.Request.UserLanguages for the datepicker to work properly... (otherwise you get an error if culture is en-US and day > 12)
you can do so only by adding a HTTP-Module (libRequestLanguageChanger.dll)
into the web.config of ReportServer
. (Requires changing trust-level from rosetta to "Full", unless you can figure out how to change the rosetta-policy to allow this http-module).
Since we can also override InitializeCulture in the HTTP-Module, you don't really have to add the runat="server" script to ReportViewer.aspx.
And there you are, ReportServer with a "custom"-culture date-format, without having to tell the user to change the browser-language.
You can fetch the links from a SQL-table, where you can replace the text
{@language}
with the culture-name of your user (in my case DE, FR, IT, EN, since those are the languages spoken in Switzerland).In your designer, the date format is determined by the culture of the operating system.
Once deployed, the date format is determined by language of the browser.