Services中为单个参数传递多个值

Services中为单个参数传递多个值

本文介绍了在Reporting Services中为单个参数传递多个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的报告中有几个多项选择"参数.我正在尝试找到一种方法来为Web查询字符串中的单个参数传递多个值?如果我输入一个值,则可以正常工作.

I have several Multi-Select parameters in my report. I am trying to find a way to pass in multiple values for a single parameter in the web query string? If I pass in a single value, it works fine.

该报告运行良好,可以为单个参数选择多个选项.我的麻烦在于网络查询字符串.

The report runs fine selecting multiple choices for a single param. My trouble lies in the web query string.

推荐答案

尽管John Sansom的解决方案有效,但还有另一种方法可以执行此操作,而不必使用可能效率低下的标量值UDF.在SSRS报告中,在查询定义的参数"选项卡上,将参数值设置为

Although John Sansom's solution works, there's another way to do this, without having to use a potentially inefficient scalar valued UDF.In the SSRS report, on the parameters tab of the query definition, set the parameter value to

=join(Parameters!<your param name>.Value,",")

在查询中,您可以像这样引用值:

In your query, you can then reference the value like so:

where yourColumn in (@<your param name>)

这篇关于在Reporting Services中为单个参数传递多个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 01:43