搜索一长串值 SSRS 参数的方法

Ways to search long list of values SSRS parameter

问题: 我正在使用的报告具有包含 200 多个唯一值的 Building 参数。我正在尝试找出一种方法,让用户能够尽可能快地搜索和找到他们感兴趣的值(而不是滚动并 select 一个一个地搜索)。

到目前为止,我使用的是另一个提示,您可以在其中传递一个字符串值,该字符串值通过拆分函数生成构建提示。如果您不传递任何内容,默认情况下 select 都是。

它有效,但仍然不理想,因为它会包含您可能不感兴趣的其他值。示例:我只想要:20500,20700,21400。

问题: 有没有更好的方法来解决这个问题?
有没有办法节省 select 离子?然后允许用户 select 他们的 "top 10 most used" selections?

我认为将它转储到 Excel 中然后使用其过滤功能更容易,但用户不同意 :)。

Agreed, sometimes a quick export to Excel solves an issues that is complex in the report. That being said...

Top ten idea: Considering that all executions of reports are stored in the ReportServer database as a log table, you have the information about which parameters are the user's top picks if you have access to this database (I understand not everyone will have access in their organization). In the past I've had SSAS data models built off this information so that we could analyze the information as well as feed it into report parameters for situations just like this. You would query the execution log or data model, create an optional parameter that includes the top 10 and then filter by it if the user selects a value off it.

Filter Parameter: You have the concept of this already obviously and should be able to add more complex logic (preferably isolated in a stored procedure) to meet your requirements. In the case of matching '205' to '20500', you need to pad each parameter value up to 5 characters with zeroes on the right side and match that against the left 5 characters of your building value.

Save Selection: I might get criticized for this one because I believe reporting should be a read and not write process, but this is something that I implemented in a scenario where SSRS HAD to be used and I was being pushed to find a solution. Pull your main dataset from a stored procedure that you will obviously be passing your filter parameter into and add another parameter for the user executing the query. In the stored procedure before you return the results, do an upsert into a new UserLastParameter table to record the user's last value and then use this table to populate future parameter values.

通过允许选择多个值,将关键字提示从文本框转换为 LOV,我能够满足用户的需求。通过这样做,用户可以简单地从电子邮件或 excel 电子表格中复制和粘贴数据。它还会自动添加逗号!谁会知道!