="Reporting Months:- " & join(iif(Parameters!Month.Value ,"1" ,"January"
,iif(Parameters!Month.Value ,"2" ,"February"
,iif(Parameters!Month.Value , "3" ,"March"
,iif(Parameters!Month.Value ,"4" ,"April"
,iif(Parameters!Month.Value ,"5" ,"May"
,iif(Parameters!Month.Value , "6" ,"June"
,iif(Parameters!Month.Value , "7" ,"July"
,iif(Parameters!Month.Value , "8" ,"August"
,iif(Parameters!Month.Value ,"9" ,"Setember"
,iif(Parameters!Month.Value , "10" ,"October"
,iif(Parameters!Month.Value , "11" ,"November"
,iif(Parameters!Month.Value , "12" ,"December" ,Nothing
)))))))))))),",")
Asked
Active
Viewed 204 times
0
-
"Having trouble" is not very informative. We have very few psychics on this site. Please visit the Stack Overflow help center and read the guidelines for asking a good question. This is a good page to read: https://stackoverflow.com/help/how-to-ask – Dale Wilson Jul 19 '17 at 20:58
-
You should look into using the switch() method instead, nested if statements are rarely useful, especially if there are many of them – Master Yoda Jul 25 '17 at 10:42
1 Answers
0
The problem is you have ","'s where you should have "="'s for comparison in the IIF statements. Corrected code below:
="Reporting Months:- " & iif(Parameters!Month.Value ="1" ,"January"
,iif(Parameters!Month.Value ="2" ,"February"
,iif(Parameters!Month.Value = "3" ,"March"
,iif(Parameters!Month.Value="4" ,"April"
,iif(Parameters!Month.Value ="5" ,"May"
,iif(Parameters!Month.Value ="6" ,"June"
,iif(Parameters!Month.Value = "7" ,"July"
,iif(Parameters!Month.Value = "8" ,"August"
,iif(Parameters!Month.Value ="9" ,"Setember"
,iif(Parameters!Month.Value ="10" ,"October"
,iif(Parameters!Month.Value = "11" ,"November"
,iif(Parameters!Month.Value = "12" ,"December" ,Nothing
))))))))))))
I've also taken off the JOIN command since it won't work with the IIF as is. If the Parameter needs to be multiparameter, You can set the "Values" in the parameter, to the month name and join those together using the following line:
= "Reporting Months:- " & join(Parameters!Month.Value,",")
Or in newer versions of SSRS, yu can simply use the following instead of the Nested IIF statement.
=MonthName(Parameters!Month.Value)
This works in SSRS 2012 and I'm going to assume, future versions as well.

SteveB
- 894
- 7
- 15
-
I updated the code above to remove the #Error caused by the join. I also gave you a different way to join if you specify MonthName values in the parameter list. – SteveB Jul 19 '17 at 21:57