简体   繁体   English

如何在SSRS报告网址中传递“全选”参数?

[英]How to pass 'Select All' parameter in SSRS report url?

I've been stuck with this problems for 2 days now and I don't know how to corner it. 我已经被这个问题困扰了2天了,我不知道该如何解决。 Basicly, I'm building list of report URL's with provided parameters in URL so I can run them without selecting each checkbox. 基本上,我正在使用URL中提供的参数构建报告URL的列表,因此我可以运行它们而无需选中每个复选框。 I've found the way how to select most of the values without problem, but sometimes I want to choose "(Select All)" option from dropdown, but I don't know how. 我已经找到了如何选择大多数值而没有问题的方法,但是有时候我想从下拉菜单中选择“(全选)”选项,但是我不知道如何。 What do I need to pass in parameter so that it would select all for rendering a report? 我需要传递什么参数,以便它将全部选中以呈现报告?

Do you have any suggestions? 你有什么建议吗?

for example,this works for me: &Company= xxxx &Partner= yyyy &Name= 3 &rs:Command=Render 例如,这对我有用 :&Company = xxxx &Partner = yyyy &Name = 3 &rs:Command = Render

Default the Parameter(s) to NULL in the RDL. 在RDL中,默认将参数设置为NULL。 Then you can simply call the report without specifying a value for the parameter and it will automatically pass NULL into the proc. 然后,您可以简单地调用报表而无需为参数指定值,它将自动将NULL传递给proc。

Then in your proc you will need to change your predicate (probably, although no code has been provided) to something like this: 然后在您的proc中,您需要将谓词(可能,尽管没有提供任何代码)更改为如下形式:

Where (tablealias.Company  = @Company or @Company is NULL)
AND (tablealias.partner  = @Partner or @Partner is NULL)
etc

So taking company as an example, if you specify a value in the URL it will search for that value in the proc, if you don't it will return regardless of company. 因此,以公司为例,如果您在URL中指定一个值,它将在proc中搜索该值,否则,无论公司如何,它都会返回。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM