简体   繁体   English

SSRS-在报表参数中不需要“允许允许NULL”共享数据集参数

[英]SSRS - Make Allow NULL shared dataset parameter not required in report parameters

I have a shared dataset that calls a stored procedure with optional parameters (they are defaulted to NULL). 我有一个共享数据集,该数据集使用可选参数调用存储过程(它们默认为NULL)。 I have set them to "Allow NULL" in the shared dataset. 我在共享数据集中将它们设置为“允许NULL”。 Is there a way to set up the report that uses this shared dataset so I don't have to add every parameter to the parameter list? 有没有一种方法可以设置使用此共享数据集的报告,因此我不必将每个参数都添加到参数列表中? It seem redundant to have to add every one then hide and set to NULL. 必须添加每个然后隐藏并设置为NULL似乎是多余的。

You mean report parameters, not query parameters, right? 您的意思是报表参数,而不是查询参数,对吧? Report parameters belong to the report, not the dataset. 报表参数属于报表,而不属于数据集。 You best option would be a template based approach. 您最好的选择是基于模板的方法。

  1. Create a Report Project Template for Visual Studio that includes the parameters. 为包含参数的Visual Studio创建一个报表项目模板。

  2. Utilize the Reporting Service api within an internal tool and pull down the definition of a known (base) report and create a new .rdl file locally and include it in your project. 在内部工具中利用Reporting Service api,并下拉已知(基本)报告的定义,并在本地创建一个新的.rdl文件,并将其包含在您的项目中。

  3. Tried and true copy and paste from a bare bones report that includes your dataset link and parameters. 尝试并真实地从包含您的数据集链接和参数的基本报告中复制和粘贴。

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

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