SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

SSRS - Join Function

Often when designing a Reporting Services with parameters you may be required to display those parameter values on your report.  This is beneficial when you have a lot of values for one parameter or maybe you just want to print the report and need to know how the report is being filtered. 

Normally if you would like to use a parameter anywhere in the design of your report you can simply drag in the parameter name from the Report Data tab.  Here I’ve concatenated the parameter value with some text:

="Category: "+Parameters!Cat.Value

However, when you have a parameter that can have multiple values you will run into an issue with displaying these parameter values correctly.    

The problem it is displaying an array where normally a single value would be placed.  The fix for this is a pretty simple function that exists in Reporting Services called Join.  By changing my parameter textbox to the following:

="Category: "+Join(Parameters!Cat.Value, ", ")

Making changes places the array in a comma delimited list visible to the user.

Devin Knight

Devin is a BI consultant at Pragmatic Works Consulting. Previously, he has tech edited the book Professional Microsoft SQL Server 2008 Integration Services and was an author in the book Knight's 24-Hour Trainer: Microsoft SQL Server 2008 Integration Services. Devin has spoken at past conferences like PASS and at several SQL Saturday events. He is a contributing member to the Business Intelligence Special Interest Group (SIG) for PASS as a leader in the SSIS Focus Group. Making his home in Jacksonville, FL, Devin is a participating member of the local users’ group (JSSUG).


Posted by mazebane on 18 October 2012

Thank you, i was searching all day for this yesterday!

I wanted it to use in an action url to pass all the parameter fields to another report but im over the 260 charachter limit!

Leave a Comment

Please register or log in to leave a comment.