For reports that requires start and end dates as parameters, typically the default dates are set as today and today + 1 day or today + 1 month. Instead it might be a good idea to pick up the start and end dates from the database. This way the user will not have to play the guessing game of trying different date ranges to generate a valid report.
To do this, create a new dataset. Paste the below query
Declare @joindate datetime select @joindate = max(joindate) from employees select cast(convert (varchar(10),dateadd(dd,-(day(@joindate)-1),@joindate),101) as datetime) as startdate, cast(convert(varchar(10),dateadd(dd,-day(dateadd(mm,1,@joindate)),dateadd(mm,1,@joindate)),101) as datetime) as enddate
Next on the Reports Parameters window, set the default values as – From Query and select the Start and End dates.
Next time when you run the report, the start and end dates will be picked up from the database. You can use these dates to generate the report by default.