Question

Line Items Looping in Report

  • 23 November 2022
  • 30 replies
  • 299 views


Show first post

30 replies

Userlevel 2
Badge

Hi @ALEXSLUSSER15 ,

How have you defined a relationship between AMProdEvnt and AMMTran?  If by “looping” you mean duplicate records it is most likely because of an issue with the joins.  

 

Hi @lauraj46 ,

Essentially, when I run the report, it just repeats the line item over and over again, for hundreds of pages. It takes a long time to load.

I’ve also come to the conclusion that it is the joins, but I’m not specifically sure how to fix it. I’m still very new to Acumatica reports.

 

Userlevel 7
Badge +7

Hi @ALEXSLUSSER15 ,

Please attach your report (rpx) file to this thread.  Thanks.

Userlevel 2
Badge

@lauraj46 Here it is. 

 

Userlevel 2
Badge

@ALEXSLUSSER15 , 
The issue will definitely by in the joins. AMProdItem to AMProdEvnt would be joined on Ordertype, ProdOrdId to OrderType, ProdOrdID. 
 
I am not sure about the join to AMMTran from AMProdEvnt. 
maybe OrderType, ProdOrdID, LineNbr for each table
 

@wfilipiak67 This is the current join table. Could you break me down the joins I need to change, add and remove? I’m a bit confused as to which ones to modify.

 

Userlevel 2
Badge

Hi @ALEXSLUSSER15 ,

Thanks for attaching the report.  I see some problems with your schema that are causing the duplicates and performance issues.  

  1. I don’t see any data field links for some of the relationships in your schema, for example the AMProdItem and the AMOrderType tables should be linked by the OrderType field.  
  2. There is also no relationsip defined between AMProdEvnt and AMProdItem.  Every table in the schema needs to be joined to the other tables by the key fields, otherwise the query will return what is called a “cross join” (the combination of every record on one table with every record in the other table).  

You could look at the standard report Production Order Labor Efficiency to see an example of the joins to production order transactional records.  

Often it’s easier to build a query with the correct relationships using a Generic Inquiry.  To understand the data, try adding a filter so that you are only looking at one are a couple of production orders.  Once you understand the data tables and relationships, then you can use the function “Export as Report” from the GI to create the schema for your report.  

Hope this helps.

Sorry, I’m very confused. What *should* the relationships table look like? This is all very new and complex to me.

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