November 5, 2009 at 5:26 am
I currently have a report that uses a dataset to create a list of dates for paramater drop down list. Currently the format of the date is dd/mm/yyyy. However I would like the format to be mon-yy e.g. aug-2009. How can I do this. Do I need to alter the format within the dataset query?
Regards
Sauce1979
November 5, 2009 at 9:54 pm
I know squat about reporting services but, hopefully, my response will act as a "bump" for your post, someone who understands SSRS will see it, and you'll get your answer.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 6, 2009 at 9:06 am
You need to use the FORMAT command in the expression builder so example is "=FORMAT(YourfieldName, "MMM yyyy").
November 6, 2009 at 9:11 am
I am aware of that but how can I specifically apply it for a parameter. That is to say where do I find the expression builder to format the parameter.
November 6, 2009 at 11:51 am
Yes, you are going to have to format it in your dataset. Additionally, you are going to have to include the numeric month to order the dataset - or it will not be in the proper order.
And finally, once you do that - you will no longer have a datetime parameter and will not be able to use the datetime picker. If your procedure or code is using a datetime parameter - then you are going to need to include an actual date for the value - with your external value as the drop-down value.
Oh, one more thing - by doing this, you are going to cause yourself problems if you pass a date formatted as dd/mm/yyyy to SQL Server. Depending upon the server settings - SQL Server will interpret the above date differently. I would recommend that you use values with the format of YYYYMMDD - which is un-ambiguous and will not be misinterpreted by SQL Server.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
November 6, 2009 at 12:54 pm
If I include the numeric month how will I be able to display aug-2009 for example?
November 6, 2009 at 7:23 pm
When you setup the dataset - you have two values returned from the query. The first will be the label (what the user sees) and the second will be the actual value passed to your query.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
November 8, 2009 at 8:03 am
November 8, 2009 at 8:51 am
Many thanks for the information. It really helped. Apologies for asking obvious questions but I have been dealing with this report for a long time now and have taken care of the most complex parts of it. This date issue i left to the end as I thought it would be easy to tackle. In any case I have opted for adding a calculated field in my dataset and this seems to work.
Regards
Sauce1979
November 8, 2009 at 4:52 pm
becklery (11/8/2009)
Hi, eseosaoregie.In my opinion, maybe you can use RAQ Report to solve your problem.
As I know, it allows users to set format for data easily.
Regards,
becklery.
Heh... first Dassin, now you. What are you in? An MLM for RAQ?
If you're going to spam us, at least make it complete spam with an actual solution. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply