BLOGS BY TOPIC▼
BLOGS BY AUTHOR▼
BLOGS BY YEAR▼
Posted by Andy Brown on 24 February 2012
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
Date Formats for Reporting Services Parameters
Sometimes I write blogs for my own sake, just to stop myself having to reinvent the wheel time and time again. This is one of those times!
This is also an appeal for help, and raises more questions than it answers. Can anyone add a comment to throw any light on this? All help gratefully received!
The Question - How do Dates Appear in Parameters?
For the fairly simple SSRS report shown below, the user has to enter a date as a parameter:
You can type in a date, and the report will show all actors in the underlying database born on or after that date.
The question is: how can you influence the date format? First I'll give an answer, and then explain that it doesn't seem to work, and in any case answers the wrong question.
Changing the Date Format for Report Parameters
The best way to do this - says everyone - is to change the report's language, and to do that you need to change the report's properties:
Click completely off the report (on the slightly shaded area above, below or to the left or right of your design) to select the report.
You should now see the properties of the report in the Properties window, and can change the language setting:
You can set the property of the report to a specific language by choosing it from the list.
A better option is probably to set an expression for the language:
You can click in the Language property and choose to set an expression.
You can then choose to change the language to that set on the report author's computer:
Click on Built-in Fields as a category, then double-click on Language to get the expression shown.
All of this is very interesting, but there are two problems with it: it doesn't seem to work, and it won't have any effect on the date format when you deploy your report.
Does the Language Setting Work?
After making the change above, nothing seems to alter:
The format of the report parameter is still not correct!
Can anyone help? Why can't there just be a single setting saying: "show my dates in this format"?
What Happens when you Deploy a Report
When you deploy your report, it's the date settings of the client browser (in this case, IE9) which take effect:
The date is now perfect (for the UK format I want to use).
So perhaps the moral is: don't fuss too much about the date format when you're authoring reports, and just make sure it looks OK when you deploy them.