Solved

Passing variable from a subreport gets out of sync if subreport tables have no records

  • 26 September 2022
  • 2 replies
  • 76 views

Userlevel 6
Badge +5

Hello,

I am passing a variable from a subreport back to the main report.

This is working with one problem.

If the subreport has no records to report, the variable being passed back to the main report is wrong.

The variable should always report the value from the subreport for the current record.

The subreport itself prints correctly, but the variable appears to be from the previous record’s subreport value.

 

icon

Best answer by BenjaminCrisman 26 September 2022, 20:00

View original

2 replies

Userlevel 7
Badge +4

@ltussing03 Does this report require use of variables or can the actual data fields be used instead?
If it is just looking for a single value off a populated field then I think removing the variable and just using whichever field is calling in the value should work.

Otherwise you may want to check where the group is getting defined and possibly check the Process Order to see if this can make a difference.

Variables are a little challenging sometimes but if you want to share the report and subreport I can check it (providing it has data which can populate based on Sales Demo data).
Otherwise it might help to also see the variable configuration and the subreport configuration

Userlevel 6
Badge +5

Ben,

This was to gather subtotal where a many to many relationship existed between the tables.

I found another way to get this figure without needing to subtotal in a subreport though so this is a moot question for me now.

I sincerely appreciate you taking the time to respond!

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