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?


10 replies

Userlevel 7
Badge +10

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.

Userlevel 7
Badge +7

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

Userlevel 7
Badge +10

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?

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

Userlevel 7
Badge +7

@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

Userlevel 5
Badge +2

@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

Userlevel 7
Badge +7

@wfilipiak67 

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

Userlevel 7
Badge +10

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’)

Userlevel 7
Badge +7

Very nice, @Gabriel Michaud !

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

Userlevel 7
Badge +10

@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


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