简体   繁体   中英

SSRS Parameter filtering using sql

在Visual Studio 2012 SSRS报表中,如果在报表中我传递了一个过滤器参数(例如Department-Name),但是在使用SQL查询处理报表时,我希望Department-ID作为Where子句中的过滤器...那么如何导出Department-来自参数的ID为Department-Name,而不使用子查询或嵌套查询.....,因为它们将不起作用,也无法添加/显示其他参数作为Department-ID。

You need to make sure the parameter you created for DepartmentName corresponds to the parameter within the dataset. If it does match, it should pass the parameter to the dataset. That way having the ID of the DepartmentID and the Value of the DepartmentName, it should work for both values.

Your dataset procedure would get the ID rather than the label which is just for users. For more information look at:

Paremeters in SSRS Reports

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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