In the real development environment, there are lots of requirements where we need to get the month name from the month number or date field in the SSRS. There are many ways to get the month name from the month number /date which are given below:
- By using Format Function
- By using Switch Function
- By using IIF Function
By using Format function
This function could be very useful if you are pulling the month name from the date field or variable. Here, you need to right click on the Textbox on which you want to display the month name and choose properties. In Textbox properties window, you can do the following things with the Format function as -<-- It will give you the full name of the month such as January.
=Format(Fields!MonthNumber.Value,"MMMM")
<-- It will give you the starting three character of the month name such as Jan.
=Format(Fields!MonthNumber.Value,"MMM")
<-- It will give you the full name of the month such as January.
=Switch(Fields!MonthNumber.Value = 1, "January",
Fields!MonthNumber.Value = 2, "February",
Fields!MonthNumber.Value = 3, "March"................)
OrFields!MonthNumber.Value = 2, "February",
Fields!MonthNumber.Value = 3, "March"................)
<-- It will give you the starting three character of the month name such as Jan.
= Switch(Fields!MonthNumber.Value = 1, "Jan",
Fields!MonthNumber.Value = 2, "Feb",
Fields!MonthNumber.Value = 3, "Mar"................)
By Using the IIF FunctionFields!MonthNumber.Value = 2, "Feb",
Fields!MonthNumber.Value = 3, "Mar"................)
SSRS is fully loaded of lots of function which can be used as per the requirements. This is the lengthy step to get the month name from the month number such as
<-- It will give you the full name of the month such as January.
=IIF(Fields!MonthNumber.Value = 1, "January", IIF(Parameters!Month_Number.Value
= 2, "February", ...)))))))))))
Or<-- It will give you the starting three character of the month name such as Jan.
=IIF(Fields!MonthNumber.Value = 1, "Jan", IIF(Parameters!Month_Number.Value
= 2, "Feb", ...)))))))))))
So, we have a lots of functions which can be used to achieve the requirement. Some of them are very lengthy and need more concentration to apply them.
So, we have a lots of functions which can be used to achieve the requirement. Some of them are very lengthy and need more concentration to apply them.
This comment has been removed by a blog administrator.
ReplyDeleteThanks for ur useful information
ReplyDeleteThanks for sharing these information
ReplyDeleteOnline Inventory Software
Envision, each time you go on vacation, you're changing money you home cash to the outside cash.convert money online
ReplyDeleteVery efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. convert money
ReplyDeleteDid you realize that when you do this, regardless of whether you're in your nearby trip specialist converting £100 into USD, you're somewhat cheapening the Great British Pound. convert money calculator
ReplyDeleteThese online gateways causes the intrigued brokers to realize the Forex market structure and the rewarding alternatives so as to spare a lot of cash of the speculators. Best South African brokers
ReplyDeleteWhat a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. Vistara customer care
ReplyDeleteLike other crypto trading bots, there’s limited maintenance required after signup. You don’t need to do anything except monitor the performance of the bot. Auto crypto bot
ReplyDeleteI appreciated your work very thanks data entry ecommerce
ReplyDeleteAre there any "Live" stores that you can assess. This ought to be the best sign, since you can see "live" what you may get. Did the "live" stores require programming? besimple.com/
ReplyDeleteWow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks video upload
ReplyDeleteI liked your article and I hope you will have many entries or more store name ideas
ReplyDeleteAmazing knowledge and I like to share this kind of information with my friends and hope they like it they why I do more info
ReplyDeleteThe web site is lovingly serviced and saved as much as date. So it should be, thanks for sharing this with us. website
ReplyDeleteWow this was amazing. I was just about to look for some expert and educative content like this, I am grateful that I have frequented here! https://givetime.io/
ReplyDelete