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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s