I also suggest posting your question in one of the Crystal Report forums. Not all SQL Server TSQL commands work in Crystal Reports.
Personally, I would create a stored procedure in SQL Server that has the number of days as a parameter. Then run the query from Crystal Reports inputting the number of days you need.
It's been a while since I used Crystal Reports, so again you might get better help in the Crystal Reports forums.
-SQLBill
The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875