Skip to main content
Solved

Subreport linkage to main report


Forum|alt.badge.img+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!

Best answer by hkabiri

@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

View original
Did this topic help you find an answer to your question?

3 replies

hkabiri
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Support Team
  • 229 replies
  • Answer
  • July 22, 2022

@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


Forum|alt.badge.img+5
  • Author
  • Captain II
  • 293 replies
  • July 24, 2022

Sam,

That was perfect!

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


  • Freshman I
  • 1 reply
  • December 3, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings