Hi,
The following description shows a possible approach for doing what you want to do. It involves the use of two internal Report’s parameters for specifying the starting and ending dates. Users running a report will not be prompted to enter a value for Internal Report’s Parameters.
Here is the query part that will let you filter your items between two dates:
Please note that when running the query in the data view, you will be prompted to enter values for the two parameters. This is an expected behavior because at this stage you are only executing the query and not the report. Therefore the report’s parameters are not passed to the query. For a query, dates parameters have to be entered in the following forma: AAAA-MM-YYThh:mm:ss (eg: 2009-04-01T10:00:00).
Now to the report’s parameters:
The report’s parameters should have been created automatically (under the hood, BIDS will ask Enesys RS Data Extension for query’s parameters and create corresponding report’s parameters, which makes senses).
Select Reports and Report Parameters in the menu.
You should get a dialog box similar as the following screen shot:
Set the Data type of both parameters to DateTime.
Check Internal.
Move up EndDate before StartDate (because StartDate formula will depends on EndDate’s value).
And set an expression as the default value:
- for EndDate parameter: =Today().AddHours(20).AddMinutes(02)
This will return the date of the current day at 8:02 PM - for StartDate parameter : =DateAdd("d",-1,Parameters!EndDate.Value)
This will return the EndDate minus one day.
Let me know if you have any questions.
Regards,