What is the purpose of the 'Over90Days' function in Crystal Reports? {CreatedDate} Over90Days
When I use this function in my report, it returns records from the past 120 days instead of the expected 90 days. What is the equivalent expression in SSRS to return previous 90 days of records?
As MilletSoftware pointed out, Over90Days
means exactly that, anything over 90 days, not "over the last 90 days".
In SSRS you would typically do this as part of the dataset query in the WHERE clause, something like
SELECT * FROM myTable WHERE DATEDIFF(d, myDateColumn, getdate()) <= 90
This is usually the best way as it reduces the amount of data being sent to the report, rather than sending thousands of rows, and then filtering the results later.
Alternativley, if you have no control over the query, you can add a filter expression to the dataset filters collection.
Set the expression to something like
=DATEDIFF(dateinterval.Day, Fields!myDateColumn.Value, today())<=90
Set the expression type to Boolean
, the operator to =
and the value to true