Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

IIF and Join on parameters

$
0
0
I have a multivalue parameter that can be 4 choices, or all. I want to display those parameters on the second subreport. I get it to work just fine on the first report because i specify the parameters and give them a label of what I want and the value that is in the database. However, when it goes to the second and third subreports its only showing the value.So, what I want is if all 4 are selected, display "ALL", if there are 2 or 3 selected, join those parameters but display alternate text. The parameter is frequency and the values in the database are A, Q, M or W, and I want to display Annual, Quarterly, Monthly or Weekly. These are the expressions I have tried.=iif(Parameters!prm_frequency.Count > 3, "ALL", join(iif(left(Parameters!prm_frequency.Value, 1) = "A", "Annual", iif(left(Parameters!prm_frequency.Value, 1) = "Q", "Quarterly", iif(left(Parameters!prm_frequency.Value, 1) = "M", "Monthly", "Weekly"))), "&"))this didn't work and just gave me an error because of the object to stringI think I am close with this one but it only gives me the first value and doesnt join them:=iif(instr(join(Parameters!prm_frequency.Value, "&"), "A") > 0, iif(instr(join(Parameters!prm_frequency.Value, "&"), "Q") > 0, iif(instr(join(Parameters!prm_frequency.Value, "&"), "M") > 0, iif(instr(join(Parameters!prm_frequency.Value, "&"), "W") > 0, "ALL", "Annual"), "Quarterly"), "Monthly"), "Weekly")Any help would be greatly appreciated as my only other alternative is to have database create a view to use instead of the tables, but that may take a while, lol.TIA

Viewing all articles
Browse latest Browse all 2791

Trending Articles