Automating crystal report - need to run for the last week

Viewed 8

I have a crystal report I run weekly and manually update the dates to pull the last 7 days (not including today). I've tried to use 'in last7days' and/or {date} >= minimum(lastfullweek) + 1 and {date} <= maximum(lastfullweek) + 1. I can't get this query to run - I get an error saying a string is required here. My date format is yyyy-mm-dd. I need to update this report to run automatically - I don't want to run the report by manually updating the date range every week. Thanks in advance for your help!

2 Answers

You are probably comparing a string to a date. Check the data types of the elements in your expression. Most likely your {date} column is a string rather than a date.

See if you can convert it to a date (e.g. the cDate() function).

Try R-Tag Community Edition. It is free and has the option to set the dates and other values outside the report so you don't have to hardcode them inside the report.

Related