0

Using SSRS 2012

I have a multivalue parameter in a report and I would like to make it the source of a table. Is there a way to accomplish this? I'm coming to the conclusion that one cannot make the data source of a table anything except a dataset.

I tried to make the multivalued dataset (source of parameter) filtered by parameter but that gives a forward reference error (makes sense).

I am now trying to set the visibility property on the table's single text box like this, so it will only make the values visible that are one of the chosen parameter values: =IIF(Fields!MODALITY.Value = Join(Parameters!Modalities.Value,","),True,False)

but they are all shown (alway true?). Any ideas on how to show a list of the values picked from a multi valued parameter in the report as a table (not just a delimited string in a text box)?

PBMe_HikeIt
  • 659
  • 8
  • 24

2 Answers2

1

The data source of a table will always be a dataset, but you can use the parameters in a dataset. Something like

select * from dbo.split3(@parameter)

where split3 is a csv to table function, like one found on http://blogs.msdn.com/b/amitjet/archive/2009/12/11/sql-server-comma-separated-string-to-table.aspx

busytools
  • 361
  • 1
  • 6
0

I found an expression that works for changing visibility so that my table shows just the elements in the multivalue parameter that were selected. Perhaps there's an easier way.

=IIF(Instr(","+Join(Parameters!Modalities.Value,",")+",",","+Fields!MODALITY.Value+",") <> 0,False,True)
PBMe_HikeIt
  • 659
  • 8
  • 24