Reputation: 241
I have a Parameter in my SSRS report which is the Financial Year. I also have one for the Financial Period. Both of these have a start and end date.
For both parameters I want the report to default to the current year and period off of today's date.
So example for Parameter Financial Year I have the following fields - Year = 2015, 2016, 2017 StartDate EndDate
So as today's date is 27/07/2016 and that is between the start and end date of 2016 I would want that to come back as the default.
Similar to the Period. For that I have the following fields - Financial Period = 201601,201602..and so on Start Date End Date
As todays date falls between the start and end date of 2001617, it is that period that I would want to be defaulted.
Many Thanks
Upvotes: 0
Views: 394
Reputation: 14108
To get the current year you can use:
=Today.Year
For the period you can use this:
=Today.Year & format(Today,"MM")
If your period column is a int
column you can use:
=CINT(Today.Year & format(Today,"MM"))
Let me know if you need further help.
Upvotes: 0