简体   繁体   English

在SSRS中使用过滤器表达式获取日期范围

[英]Using Filter expression in SSRS to get a range of date

I am working on SSRS 2008 in the filter expression to get a range of records from today's date plus 100 more days. 我正在过滤表达式中使用SSRS 2008,以获取今天日期加上100天以上的一系列记录。 This is the condition entered: 这是输入的条件:

=Fields!Maturity_Date.Value >= today() AND 
 Fields!Maturity_Date.Value <= DateAdd("d", 100, Fields!Maturity_Date.Value)

Later I change the Datatype to Boolean keeping the operator as '=' and insert value as 'True'. 稍后,我将数据类型更改为布尔值,将运算符保留为'=',并将值插入为'True'。

When I run the report it gives me an error 当我运行报告时,它给我一个错误

Failed to evaluate the FilterValues of the Tablix 'Renewal_Letters' 无法评估Tablix'Renewal_Letters'的FilterValues

What can be my mistake here? 我在这里可能会犯什么错误?

I found what I was looking for: 我找到了想要的东西:

I had made a mistake in the syntax of DateAdd() This is what it should have been: 我在DateAdd()的语法中犯了一个错误,这应该是这样的:

=Fields!Maturity_Date.Value >= today() 
AND Fields!Maturity_Date.Value <= (DateAdd("d", 100, today()))

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

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