SSRS:如何在查询中直接使用参数?

时间:2016-07-11 18:03:24

标签: ssrs-2012

这是我的疑问。在应用程序中,查询稍微复杂一些,但重点更多的是如何使用参数

SELECT EmpName, Department, Salary
From tblEmployees
WHERE Salary >= @baseSalary

如果用户想要选择工资从某个级别开始的员工,他们就可以这样做。

我在Plurasight上发现了一些关于如何过滤结果的视频,但没有关于如何在查询中直接使用参数的视频。

感谢您的帮助

1 个答案:

答案 0 :(得分:1)

I create parameters in SSRS and then map them to the query with the Parameter tab in the Dataset Properties. If you use the same name for your parameter as the query, they will map automatically.

Here's an example of how I use them together:

Parameters

enter image description here

Dataset query

enter image description here

Parameter Tab of Dataset Properties

enter image description here

相关问题