Solved

Subreport linkage to main report

  • 21 July 2022
  • 3 replies
  • 1055 views

Userlevel 6
Badge +5

Hello,

I am creating my first subreport and have a very basic question.  My subreport works.  I have no selection criteria or parameters.  It just spits out all the data in the table.  Only a few records in it.

However, I want the subreport to only show records relevent to the main report when I place it on there.

Specifically, this is to print relevant discounts in ARInvoiceDiscountDetail when printing an invoice.

So I assume I have to create a parameter on my subreport, and pass the invoice ID to it from the main report so I only get the discount records associated with the invoice being printed.

Like I said, this is my first one using the reporting tool, so I’d appreciate it if someone could provide detailed instructions on this?  I have viewed videos etc and they seem to skip over this basic linkage.

Thanks!

icon

Best answer by hkabiri 22 July 2022, 21:30

View original

3 replies

Userlevel 6
Badge +5

@ltussing03 

Yes you need a parameter for your subreport and then call it on main report as ExternalParameter when defining the subreport on your main report. Please read the example on following link which can answer your questions on how to add subreport and how to pass the required value to subreport and show the corresponding data when main report is being executed

https://help-2022r1.acumatica.com/Help?ScreenId=ShowWiki&pageid=7bbd5bbb-cd1a-4e10-9472-9497deb48f2f

Userlevel 6
Badge +5

Sam,

That was perfect!

I am sorry, I was looking elsewhere for solutions without realizing it was available in the standard help system.

If you try this method, note that IDs (e.g. Contract ID) are easier to work with than CDs (e.g. Contract CD) if you have any masking or segments.  The reason is that separators can carry from one output to the subreport’s input, thus making 00-00 output turn into 00--0 when the dash finds its way from one to the next.  I found integers to be consistently easier than character fields. 

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