Solved

Automate printing to multiple printers for certain reports

  • 15 September 2023
  • 5 replies
  • 102 views

We are moving from an older ERP to Acumatica. One of the things we had in our old system that when we printed a Work Order the printout would print to our Dot Matrix DFX-9000 and also print the WO confirmation onto our Canon iR-ADV. This is also the case with our remote locations as they would print a WO that would print to the dot matrix and also the local Canon. It would also in certain instances trigger a third print that would print the confirmation at head office as well. 

We have device hub setup with all the printers and everything works as long as it’s going to one printer. How would we trigger when certain reports are printed it also prints copies to different printers at the same time. For example Florida location prints a Work order to the dot matrix, once that happens it knows to trigger another report to print the confirmation to the Florida Canon and also the Canon in NY.

This is the same for invoices, needs to print locally and at head office accounting as well. 

icon

Best answer by darylbowman 15 September 2023, 21:42

View original

5 replies

Badge +11

I don’t think this is an out-of-the-box feature, although I’m not positive. I can confirm that this is absolutely possible with a customization.

Since you are already using DeviceHub, this would be a matter of overriding a few actions and building in the logic of where to print when.

I agree it’s definitely achievable with customization. I already know it’s not an out-of-the-box feature. I’ve been messing around in our sandbox environment but I’m not a developer so it will take longer to figure out but I’ll get there.  

Badge +11

This may save you several days of messing around 😉

Understand, this is by no means a working code block.

public PXAction<SOShipment> printLabelsToStation;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Print Labels To Station")]
public virtual IEnumerable PrintLabelsToStation(PXAdapter adapter)
{
var shipmentGraph = adapter.View.Graph as SOShipmentEntry;
SOShipment shipment = shipmentGraph.Document.Current;
if (shipment is null) return adapter.Get();

Guid? printerID = // get printerID
if (printerID is null)
throw new PXException("No packing station printer has been selected");

PXLongOperation.StartOperation(shipmentGraph, delegate ()
{
SMPrintJobMaint printGraph = PXGraph.CreateInstance<SMPrintJobMaint>();

var reportParams = new Dictionary<string, string>();

var printSettings = new PrintSettings
{
PrintWithDeviceHub = true,
DefinePrinterManually = true
PrinterID = printerID,
NumberOfCopies = 1
};

printGraph.AddPrintJob($"Label for x", printSettings, (string)null, reportParams, null);
});

return adapter.Get();
}

 

Thank you

Userlevel 3
Badge

Hi @rrodic ,

                    If iam not wrong you are printing multiple reports with Acumtica Device Hub on a Single Click.  If this is the case then YES,  This is possible with customization, I have done this type of Customization Previously

 

We can print the reports using “SMPrintJobMaint.CreatePrintJobGroup()” Method. First Create an action button and pass the inputs to the above method, Then its done 

Let me know if you are facing any issues

 

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