title: How to pass multiple values to a multivalued parameter in SSRS
body: <p>I will try to explain the issue as best as I can by oversimplifying the report structure.  Report one contains 1 group called ResourceCenter and then one line of totals under it.  The totals are actually a group but the grouping is done in SQL and are presented in a detail group.  The report looks something like this:</p>
  
  <pre><code>Report 1
  
  ResourceCenter 1
  Total1 11 
  Total2 4
  Total3 8
  
  ResourceCenter2
  Total1 12
  Total2 11
  Total3 6
  </code></pre>
  
  <p>From this report, I need to drill through to another report that has a bunch of multi-valued parameters.  For the drillthrough, I am able to use single values for everything except for EmployeeNumber.  For that, I need to be able to pass a list of EmployeeNumbers to the multi-valued parameter in Report 2.  The EmployeeNumbers are not currently present in any DataSet or parameter in Report 1 but are based on ResourceCenter.  So, if the user has run Report 1 and clicks on ResourceCenter 1, I need to be able to pass a list of EmployeeNumbers associated with ResourceCenter 1 to the multi-valued parameter in Report 2 in a way that Report 2 will handle it correctly.</p>
  
  <p>NOTE:  I should add that I have created two SQL functions that accept an input of ResourceCenter and then return a list of employees.  One is a table-valued function that returns a single column of EmployeeNumbers.  The other is a scalar-valued function that returns the EmployeeNumbers as comma-separated values.  I then have some custom code that runs the SQL function in the background and returns the list.  I have not had any success with returning a dataset that SSRS can use but I have been able to get the scalar-valued function to 'work' in the sense that I can create a field on a dummy report and see the output.  I have not had any luck getting Report 2 to accept a comma-separated list, though.</p>