Skip to main content

How to print 3 copies of a form


Using the APARord view as previously documented works well.  I have a client that needs 3 copies of a form, how do I set this up?  I am trying to print 3 copies of the Sales Order, each copy has a slight variation to what prints.  I used 2 sub-reports to achieve this, but the issue is when it tries to print a multipage sales order, the sub-report prints page 1 correctly, but then continues on with the line details onto page 2, with no logo, heading information which the client does not like.  I can create 3 separate forms, place them in the reports tab of Sales Order screen.  So the client wouldn’t have to click on each 3 separately to print, can there be some type of automation that when form A prints, automatically print form B then form C?

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

10 replies

Gabriel Michaud
Captain II
Forum|alt.badge.img+11

Hi @mdubin66,

Check out this blog post written by @lauraj46 

https://www.linkedin.com/pulse/acumatica-tips-tricks-how-print-multiple-product-labels-laura-jaffe
 

In this example, she shows how to use the DateInfo table to print the same record a variable number of times.


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • 591 replies
  • May 26, 2021

Hi @mdubin66,

The method described in my blog that @Gabriel Michaud mentioned will only work if you need three identical copies of the same report.  It sounds like you need to print three different reports. You might be able to correct the pagination issue by creating a separate GroupHeader section as described in this article:

https://stackoverflow.com/questions/57860344/enable-multi-page-sub-report-in-acumatica-report-designer

Otherwise, automatically launching all three reports with a single click would probably require a customization as described in this blog by Sergey Marenich:

https://asiablog.acumatica.com/2017/03/launch-multiple-reports-with-one-exception.html

Hope that helps!

Laura


Gabriel Michaud
Captain II
Forum|alt.badge.img+11

Laura - I think your technique can be used even if they have simple variations. Conditional formatting and the use of the VisibleExpr property can be used to show/hide fields based on the DateInfo table, so that some fields only show up on specific copies.

@mdubin66 can you describe the differences between the different copies?


  • Author
  • Freshman I
  • 2 replies
  • May 27, 2021

Gabriel Michaud

First copy prints the unit price and “Office Copy” near the top.  Second copy does not print the unit price and has “Driver’s Copy” printed near the top.  The Third copy does not print the unit price and has “Picking List” printed near the top


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • 591 replies
  • May 27, 2021

@mdubin

In that case, it sounds like the idea that @Gabriel Michaud suggested should work!  After joining on the DateInfo table as explained in the blog, you can build a formula to adjust the text value or the visibility of the fields based on the difference between the DateInfo.Date column and ‘12/31/1969’.

For example:  =IIf(DateDiff(‘d’, ‘12/31/1969’, [DateInfo.Date])=1, ‘Office Copy’, IIf(DateDiff(‘d’, ‘12/31/1969’, [DateInfo.Date])=2, ‘Driver’s Copy’, ‘Picking List’)

You could build a similar formula for the visibility condition on the unit price.  

Laura


wfilipiak67
Captain II
Forum|alt.badge.img+3
  • Captain II
  • 99 replies
  • May 27, 2021

@lauraj46

I was able to get this to work.
I used a parent field of =’3’ on the join and added a new group at the top. 

The group data field is =CDec (DateDiff('d', CDate('12/31/1969'), [DateInfo.Date]))
Without the CDec & CDate, I was getting errors.

For the conditioning,   I also had to add the CDate
=iif ((DateDiff('d',CDate('12/31/1969'),[DateInfo.Date]))='1' ,'Office Copy', iif ((DateDiff('d',CDate('12/31/1969'),[DateInfo.Date]))='2','Drivers Copy','Picking List'))

Thank you.

Bill


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • 591 replies
  • May 27, 2021

@wfilipiak67 

Thanks for the update, and glad to hear you got it working!  


Gabriel Michaud
Captain II
Forum|alt.badge.img+11

Here’s another way that avoids the need to use nested IIFs and DateDiff/CDate:

=SWITCH([DateInfo.DateInt],19700101,’Office Copy’, 19700102, ‘Drivers Copy’, 19700103, ‘Picking List’)


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • 591 replies
  • May 27, 2021

Very nice, @Gabriel Michaud !

I didn’t think about using the DateInt column this way but for a small fixed number that is perfect. 


Gabriel Michaud
Captain II
Forum|alt.badge.img+11

@lauraj46 I somehow thought the table contained a simple integer counter, like the Unix Epoch. In this case the switch or IIF() would have looked even simpler, with 1, 2, 3 instead of a date. Thanks for all your help, great blog post and #AcumaticaTnt content!!!


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