SSRS Multilookup Function for Names with Comma Sep

2019-08-02 15:12发布

I would like to put the following in a multilookup drop-down in reporting services :

"Smith, John", "Jones, Tim", "Kelly, Andy"

The comma separating the first and last name prevents the multilookup from working correctly. I am also unable to use ticks (' or ") in reporting service to keep the separating comma from working like a multilookup comma that separates the fields I want to select from.

Is there a way to keep the comma in the names while still allowing multilookup?

Any help would be much appreciated. Thank you!

1条回答
三岁会撩人
2楼-- · 2019-08-02 15:59

Assuming you already have the names in the LastName, FirstName format in a dataset:

Dataset definition

Ensure your report dataset query has the appropriate WHERE clause defined:

...
WHERE Name IN (@Name)
...

Modify the @Name parameter enabling multiple values:

Multiple value parameter

And set the Available Values of the parameter to the prompt dataset:

Available values

When the report is run, parameter selection will look like this:

Parameter selection

Take a look at this set of report development tutorials for practice.

查看更多
登录 后发表回答