AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Report De...
Sum up field while ...
 
Notifications
Clear all

Questions Sum up field while grouped.

 
Acumatica Report Designer
Last Post by Wyatt.ERP 5 years ago
8 Posts
3 Users
1 Reactions
2,214 Views
RSS
stian.simonsen
Posts: 4
 stian.simonsen
Topic starter
September 30, 2020 2:09 am
(@stian-simonsen)
Active Member
Joined: 5 years ago

Hello,

 

In report designer we have been trying to sum up some fields within a group, but it does not seem that the sum follows the groups.

We have changed the "tran group" from grouping by ARtran.InventoryID and ARtran.Linenbr, to ARtran.Shipmentnbr. If it's only one shipment on the invoice, this works as expected, but when the invoice containes multiple shipment, the Sum per shipment gets multiplied by the number of shipments. 

Is it possible to get the price sum of each shipmentnbr in the report? 

Here is an example of how we want it to work:

Shipment | qty | Total price

0001 | 2 | 100
0001 | 1 | 150
0002 | 3 | 100
0002 | 1 | 100
0002 | 3 | 120

to:

0001 | 3 | 250
0002 | 7 | 320

 

 


7 Replies
Tim Rodman
Posts: 3195
 Tim Rodman
Admin
October 4, 2020 10:19 pm
(@timrodman)
Famed Member
Joined: 10 years ago

Your logic sounds like it should work. Can you attach the .rpx file? Maybe that will shed some light.


Reply
stian.simonsen
Posts: 4
 stian.simonsen
Topic starter
October 9, 2020 6:31 am
(@stian-simonsen)
Active Member
Joined: 5 years ago

Hello Tim,

 

.rpx file is attached.

 

We found a temporary solution by getting the SoOrderShipment.linetotal. This could work, but it requires a shipment on every invoice. would be better if the sum function worked properly.

 

Regards,

Stian

ShipmentInvoice.rpx

 


Reply
Wyatt.ERP
Posts: 128
 Wyatt.ERP
October 9, 2020 9:59 am
(@wyatt-erp)
Estimable Member
Joined: 6 years ago

Hi @stian-simonsen,

It looks like the joins under Relationships are the cause. 

There is a line ARInvoice Left join SOOrderShipment on InvoiceNbr, InvoiceType.  This should be removed.

There is a line ARTran Left join SOLine on OrderType, OrderNbr, and LineNbr.  This line is fine and will join to the SOOrder properly.  ARTran also holds a line to the Shipment and it should be used instead of SOOrderShipment.

The line SOOrderShipment Left join SOShipment should be removed and replaced with ARTran Left join SOShipLine on SOShipmentType, SOShipmentNbr, and SOShipmentLineNbr. 

Next, add SOShipLine Left join SOShipment on ShipmentType and ShipmentNbr.

 

The problem isn't with SOOrderShipment  itself, but because ARTran is being joined to the SOOrders, and then with the SOOrderShipment, which also has a link to the Orders.  That second link is not being joined by the order as well, causing the duplication.


Reply
stian.simonsen
Posts: 4
 stian.simonsen
Topic starter
October 12, 2020 2:23 am
(@stian-simonsen)
Active Member
Joined: 5 years ago

Hi @wyatt-erp

 

Thank you 🙂

 

Do you have an .rpx file with those changes? We cannot get the SOShipLine table to connect correctly.


Reply
Wyatt.ERP
Posts: 128
 Wyatt.ERP
October 16, 2020 1:56 pm
(@wyatt-erp)
Estimable Member
Joined: 6 years ago

No sorry, I was just spitballing the joins.

You want it to look like this though:
 ARTran   Left   SOShipLine

Relation:
 ARTran.SOShipmentType   Equals   SOShipLine.ShipmentType   AND
 ARTran.SOShipmentNbr   Equals   SOShipLine.ShipmentNbr   AND
 ARTran.SOShipmentLineNbr   Equals   SOShipLine.LineNbr

 


Reply
stian.simonsen
Posts: 4
 stian.simonsen
Topic starter
October 19, 2020 12:53 am
(@stian-simonsen)
Active Member
Joined: 5 years ago

Ok, thank you @wyatt-erp.

 

What I meant was, the SOShipLine table is not even coded in to the .rpx file, so we can't join it to anything before we script. We have been trying to write some of it, but we can't seem to get it to work. I took a screenshot of one of our attempts at scripting and atteched it here. Can anyone see what we are doing wrong?

 

MicrosoftTeams image

Reply
Wyatt.ERP
Posts: 128
 Wyatt.ERP
October 21, 2020 10:39 am
(@wyatt-erp)
Estimable Member
Joined: 6 years ago

@stian-simonsen

This link walks you through Loading the Schema under Schema builder to add tables to your report.  It should show up on the left for you to add.

https://help-2020r1.acumatica.com/Wiki/ShowWiki.aspx?pageid=8bb29ea8-b4c4-46b7-8821-85990ed82988


Reply
Tim Rodman reacted
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 15 Online
  • 2,411 Members
Our newest member: thollings
Latest Post: Generic inquiry with information from Audit history(CT301000)
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2025 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×