Multivalue parameters in Reporting Services
Part three of a three-part series of blogs

This blog shows how to create multivalue parameters based on dropdowns, whether in SQL Server Reporting Services or Report Builder 3.0.

  1. MultiValue Parameters - SSRS and Report Builder
  2. Creating multivalue parameters in Reporting Services
  3. Showing the Values Chosen for a Multivalue Parameter (this blog)

Posted by Andy Brown on 07 November 2011

You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Showing the Values Chosen for a Multivalue Parameter

When you've got your multivalue parameter working, there's just one more step: how to get the values to show up in the title.

Ticked parameters show up in report

Here the title of the report lists the parameter values we've chosen.

 

The way to do this is to create an expression for the title of the report using the Join function.  First create the expression:

Creating a title expression

Right-click in a text box where the title will go, and choose to create an expression.

 

You can now use the Parameters category to build up the following expression:

Building up a multivalue join expression

Building up a multivalue join expression

This works by creating an array of the StudioId parameter's labels (ie the text shown for each of the studios ticked), then joining them together using a Visual Basic Carriage Return Line Feed (VbCrLf) as glue.

Here are some other possible expressions, and what they would give:

Expression Would show
Parameters!StudioId.Label(0) The name of the first studio chosen
Parameters!StudioId.Value(1) The integer id of the second studio chosen
Join(Parameters!StudioId.Label,", ") Carolco Pictures, Carolina Bank, Channel Four Films

As this shows, this array is numbered from 0, not 1.

And that's how to create multivalue parameters in Reporting Services!

  1. MultiValue Parameters - SSRS and Report Builder
  2. Creating multivalue parameters in Reporting Services
  3. Showing the Values Chosen for a Multivalue Parameter (this blog)
This blog has 0 threads Add post