My understanding is that you want the user to be able to run the report for Yesterday, Last Full Week, and Last Full Month, unless they enter a specific date in which case you want either that day, the week where that date is the ending date, or the month where that date is the ending date.
Consider two parameters - first one called Report Type, with values Daily, Weekly, and Monthly. Change Allow Custom Values to false.
The other parameter is the one you already have, I'll call it Date Range. Add the values Yesterday, Last Week, and Last Month. Allow Custom Values should be true.
Then incorporate a formula such as this into your selection criteria:
Code:
if {?Report Type} = "Daily" and not ({?Date Range} in ["Last Week","Last Month"]) then
if {?Date Range} = "Yesterday" then {yourdatefield} = currentdate - 1
else
{yourdatefield} = date({?Date Range})
else
if {?Report Type} = "Weekly" and not ({?Date Range} in ["Yesterday","Last Month"]) then
if {?Date Range} = "Last Week" then {yourdatefield} in lastfullweek
else
{yourdatefield} in date({?Date Range}) - 6 to date({?Date Range})
else
if {?Report Type} = "Monthly" and not({?Date Range} in ["Yesterday","Last Week"]) then
if {?Date Range} = "Last Month" then {yourdatefield} in lastfullmonth
else
{yourdatefield} in dateserial(year(date({?Date Range})),month(date({?Date Range})),1) to date({?Date Range})
So if the user selects report type of Daily, and leaves the parameter as Yesterday, then yesterday's data will be returned. It works the same way with Monthly/Last Month and Weekly/Last Week.
However, if they select Daily and enter a date, then data for that date will be returned. Same thing for weekly and monthly, but the data will be for the week or month with the ending date that the user entered.
If they enter incompatible parameters, such as Daily/Last Week then no data will be returned. You may want to trap for that and display a text box in the report saying something like "Incompatible Parameter Combination".