Since you're doing this in Visual Studio, it will be easier to set up the parameters. You'll need to create a screen where your users will do the following:
1. Select the date type - Weekly, Monthly, Yearly.
2. Based on the date type selected, the user will enter the parameters that need to have data for that date type.
3. Click a button to run the report. Your code for the button will set the parameters in the report prior to showing it.
In your report, you'll do the following:
1. Create the following parameters:
Date Type - string, valid values are Weekly, Monthly, and Yearly.
Week - string, optional, valid values are All, 1, 2, 3, 4, 5, default value is "All".
Month - string, optional, valid values are All, Jan, Feb,...,Dec, default value is "All".
Year - Number, no list of values.
2. If you're using tables in your report, edit the formula in the Select expert. If you're using a command, edit the "Where" clause of the command (in this case you'll create the params in the Command Editor and then modify them in the report to set the default values.) The logic is something like:
(
({?Date Type} = 'Weekly' and {week field} = {?Week} and
{month field} = {?Month} and {year field} = {?Year})
or
({?Date Type} = 'Monthly' and {month field} = {?Month} and
{year field} = {?Year})
({?Date Type} = 'Yearly' and {year field} = {?Year})
)
Note how the parentheses are set up - this won't work without them!
-Dell