Skip to main content
Solved

Modifying report date range parameters

  • 6 February 2023
  • 4 replies
  • 415 views

All, I have a report where we are reporting on a four year range. So something like this:

 

Date A from: → Date A to:

Date B from: → Date B to:

Date C from: → Date C to:

Date D from: → Date D to:

 

I need to have the 3 previous years/parameters setup like “@Today-1Y” “@Today-2Y” etc.

In Report Designer, I’m unsure how to modify the expression to display the previous 3 years in the dropdown menus. Here are the screenshots from Build Schema:

 

 

4 replies

Userlevel 5
Badge

I should add, the lines (I think) I need to modify are:

 

=DateAdd(Report.GetDefExt('RowAccessInfo.BusinessDate'), 'd', -(Day(Report.GetDefExt('RowAccessInfo.BusinessDate')) - 1))


=Report.GetDefExt('RowAccessInfo.BusinessDate')

Userlevel 5
Badge

Anybody?

Userlevel 7
Badge +4

@swartzfeger If you are using the DateAdd you can add a date which is Today(), ‘y’, -1 to get last year from today.

Otherwise you’ll need to just use a formula to get the exact date you’re looking for or try something like @YearStart -1 , -2, -3, see if that can work.

Userlevel 5
Badge

@swartzfeger If you are using the DateAdd you can add a date which is Today(), ‘y’, -1 to get last year from today.

Otherwise you’ll need to just use a formula to get the exact date you’re looking for or try something like @YearStart -1 , -2, -3, see if that can work.

Thank you Benjamin I will try that!

Reply