Search code examples
sqlreporting-servicesssrs-2008ssrs-2008-r2ssrs-tablix

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. 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'.

When I run the report it gives me an error

Failed to evaluate the FilterValues of the Tablix 'Renewal_Letters'

What can be my mistake here?


Solution

  • I found what I was looking for:

    I had made a mistake in the syntax of DateAdd() This is what it should have been:

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