Skip to main content
Answer

Modifying report date range parameters

  • February 6, 2023
  • 4 replies
  • 658 views

Forum|alt.badge.img

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:

 

 

Best answer by BenjaminCrisman

@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.

4 replies

Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • February 6, 2023

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')


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • February 13, 2023

Anybody?


BenjaminCrisman
Acumatica Employee
Forum|alt.badge.img+4
  • Acumatica Support Team
  • Answer
  • February 15, 2023

@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.


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • February 15, 2023

@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!