Solved

Report Designer issue with $TotalAmount not reflecting negative values

  • 29 September 2022
  • 6 replies
  • 103 views

Userlevel 5
Badge +1

Hi All,

 

I ran into an issue with the Order Register report specifically (tested in other reports and they act accordingly).
The $TotalAmount in the Footer does not pick up Return orders as negative values.
Even after modifying the Line level (Header of Group 1) Section, the values were represented as negative on the line level but are not reflected in the $TotalAmount column. (I created an If statement and multiplied these values by -1:
=IIf([SOOrder.OrderType]='RC',[SOOrder.CuryOrderTotal]*-1, [SOOrder.CuryOrderTotal])

(just an example of the logic behind it.)

The same  goes for $TotalLinesAmount and $TotalQTY.

Messing around with the footer level and trying to apply the logic from above just led to the same result or completely overstated amounts.

The logic works in Generic Inquiries and their Totals Aggregate functions.

Am I missing something here?
Did somebody encounter a similar issue before?

icon

Best answer by BenjaminCrisman 29 September 2022, 18:10

View original

6 replies

Userlevel 7
Badge +4

Hi @krausef77 ! Does your variable take into account the * -1, or is that only done at the line level?

If it isn’t incorporated into the variable formula, I would recommend to test it, but it sounds like you probably already have.

In that case I would recommend to create two separate Total variables where one is totaling the Returns and can be *-1 and the applied to the other total.

I can’t be certain that this is the intended functionality if the * -1 is already taken into account at the variable level, so if you do find that the variables are dropping the *-1 then I would make a support case so we can investigate to be sure this is correct.

Userlevel 5
Badge +1

Hi @krausef77 ! Does your variable take into account the * -1, or is that only done at the line level?

If it isn’t incorporated into the variable formula, I would recommend to test it, but it sounds like you probably already have.

In that case I would recommend to create two separate Total variables where one is totaling the Returns and can be *-1 and the applied to the other total.

I can’t be certain that this is the intended functionality if the * -1 is already taken into account at the variable level, so if you do find that the variables are dropping the *-1 then I would make a support case so we can investigate to be sure this is correct.

My current Variable Setup is like this that I just modified after the Plus sign, the rest is the native / out-of-the-box Acumatica setup:

 



I will try the two Variables that incorporate into one another

Userlevel 7
Badge +4

@krausef77 Thank you for the screenshots! I think I don’t understand the IIF() statement being used though, because this is just saying regardless if it is order type RC or not, it will grab the same value.

In the database, these are stored as positive values and the logic of positive or negative is applied in the site to correspond to where you see it.

You would need to add to your True clause a *-1 and this should work, though I suspect the two variable option would work as well.

Userlevel 5
Badge +1

@krausef77 Thank you for the screenshots! I think I don’t understand the IIF() statement being used though, because this is just saying regardless if it is order type RC or not, it will grab the same value.

In the database, these are stored as positive values and the logic of positive or negative is applied in the site to correspond to where you see it.

You would need to add to your True clause a *-1 and this should work, though I suspect the two variable option would work as well.

I had a wrong screenshot attached and updated it. The True statement contain the *-1 calculation.
I will explore the two variable option and update the thread if it worked.

Thank you!

Userlevel 7
Badge +4

@krausef77 Ahh ok I see, well when I think about it now, I actually think this wouldn’t work because the amount would need to be Summed and so a variable is actually a better option.
Let me know what you find with the two variables, I’m interested in the results!

Userlevel 5
Badge +1

@krausef77 Ahh ok I see, well when I think about it now, I actually think this wouldn’t work because the amount would need to be Summed and so a variable is actually a better option.
Let me know what you find with the two variables, I’m interested in the results!

In the end, it happened to be a mishap in the Version control of the report and it didn’t reflect the latest changes.
Your first proposition with the Variable adjustment worked like a charm.

I tried the two variable scenario though and achieved the same result.

Thank you very much for such a timely and helpful response

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved