我需要使用年,月和日的参数来设置SSRS报告。
以下内容可在SMS中工作(带有我所有其他代码),并提取那些声明值的数据。
Declare
@Year int = 2017,
@Month int = 05,
@Day int = 05;
Where
YEAR([Time Stamp]) = @Year
and MONTH([Time Stamp]) = @Month
and Day([Time Stamp]) = @Day
但是,在SSRS中,我需要最终用户能够选择他们输入并返回数据的任何Year,Month和Day值。当我将“声明的”值更改为:
时,该方法不起作用DECLARE
@Year int = null,
@Month int = null,
@Day int = null;
感谢您的帮助。