Get Total Based on Custom Field

  • 10 November 2021
  • 3 replies

Userlevel 3
Badge +1

I have a report requirement where I need to calculate totals based on the field HSCODE, if detail lines have the same HSCODE then their total is calculated in the footer, considering those lines together. Please let me know a solution to cater this requirement.


Best answer by Vinay Koppula 11 November 2021, 14:09

View original

3 replies

Userlevel 7
Badge +17

Hi @TharidhiP  If I understood correctly that you wanted get sum value from detail lines (HSCode) and populate that in header field. 

If yes, then you need to create a variable in the header section and assign value expression as “Sum(DAC.FieldName)” and then assign this variable to the Header Field.


Here is sample example for your reference. I have customized Sales Order report that getting sum value of QTY at line level and assigning it to new Header field by using variable. Please find the screenshots for reference.



Userlevel 3
Badge +1

Hi @Naveen B, this solution takes into regard any QTY summation, but the requirement is to get the total if the line levels have the same HSCODE to cumulate their total, if not ignore.

Userlevel 5
Badge +1

@TharidhiP you can do something like create a variable in that particular grouby section below is the example of it

$sumoftotalqty + IIF($inventoryid=True,qty,0)

and place a text box at the footer and just provide the value as $sumoftotalqty


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