简体   繁体   English

SSRS下拉列表值

[英]SSRS Drop Down List Values

We have a report in SSRS that has drop down list parameters that are fed by a shared datasource and query. 我们在SSRS中有一个报告,其中有一个下拉列表参数,这些参数由共享数据源和查询提供。

If I use ReportViewer to view the report these work as expected. 如果我使用ReportViewer查看报告,则这些工作将按预期进行。

However, I'm also using the SSRS web service to pull out the parameters and the available values. 但是,我也使用SSRS Web服务提取参数和可用值。 In this instance when drop downs are moved from a manually entered list to a query the available values list is empty. 在这种情况下,将下拉列表从手动输入的列表移至查询时,可用值列表为空。

I'm assuming the problem is because the web services simply gropes the RDL file and does not execute the queries attached to the parameters. 我假设问题是因为Web服务只是摸索RDL文件,而不执行附加到参数的查询。

My question is, is there any way to have it do this or to get the available values? 我的问题是,有什么办法可以做到这一点或获得可用值?

After reading MSDN it seems the answer is to call GetReportParameters() and set ForRendering to true: 阅读MSDN之后,似乎答案是调用GetReportParameters()并将ForRendering设置为true:

If ForRendering has a value of false, the parameter meta data returned represents the parameter data that is currently associated with the specified report. 如果ForRendering的值为false,则返回的参数元数据表示当前与指定报表关联的参数数据。 If any parameters values are based on a query and you are interested in returning the query-based parameters valid values list, you need to set ForRendering to true, In addition, for query based parameters, you need to ensure that you have passed in all of the credential information required to return the query parameters. 如果有任何参数值基于查询,并且您有兴趣返回基于查询的参数有效值列表,则需要将ForRendering设置为true。此外,对于基于查询的参数,您需要确保已传递所有返回查询参数所需的凭据信息。

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

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