By using this website, you agree to our Terms of Use (click here)
I was working on an Acumatica Report in Acumatica Report Designer recently and I created a drop-down parameter on the Parameters tab in File -> Build schema... to make it easier to choose a date range for the report:
Of course, the Parameter doesn't do anything until you go use it in the Filters tab so I started to setup this construct where different date range filters will get applied depending on which parameter option is chosen. I tried using @MonthStart and @MonthEnd on the Filters tab like this:
I like @MonthStart and @MonthEnd because they save me from having to write a formula. I also like @MonthStart and @MonthEnd because they respect the Business Date that you chose in Acumatica, unlike the Today() and Now() functions which only look at the system date on the web server which is always today's date, regardless of which Business Date you've chosen.
But, when the report runs, the @MonthStart and @MonthEnd values get translated into empty values which then causes the report to be empty.
I know that values like @MonthStart, @MonthEnd, @QuarterStart, and @QuarterEnd are legitimate values because they are visible in the Parameters section of the Expression Editor:
But it appears that @MonthStart, @MonthEnd, @QuarterStart, @QuarterEnd, etc. can only be used on the Parameters tab and not the Filters tab.
So why not create "harvester" parameters that do nothing but get the values in @MonthStart, @MonthEnd, @QuarterStart, @QuarterEnd, etc. Then use those "harvester" parameters on the Filters tab?
I built 4 "harvester" parameters: MyMonthStart, MyMonthEnd, MyQuarterStart, and MyQuarterEnd. Each "harvester" parameter does nothing but "harvest" the values from @MonthStart, @MonthEnd, @QuarterStart, and @QuarterEnd as you can see with the MyMonthStart parameter in this screenshot:
Note in the screenshot above that I unchecked the Visible checkbox. I did that for each of the 4 "harvester" parameters so they aren't visible when you go to run the report.
On the Filters tab, I changed @MonthStart to @MyMonthStart and @MonthEnd to @MyMonthEnd as you can see here:
Now the report runs and returns the data that I expected to see.