SSRS Multilookup Function for Names with Comma Separation

孤者浪人 提交于 2019-12-11 06:30:00

问题


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:


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

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

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

Modify the @Name parameter enabling multiple values:

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

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

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



来源:https://stackoverflow.com/questions/19687600/ssrs-multilookup-function-for-names-with-comma-separation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!