Skip to main content

Hello,

How can I print a report a specific number of times based on a dynamic value in Preferences?

I've created a Processing Screen for printing reports, and I need the report to print as many times as the count specified in the Processing Screen.

Can anyone please suggest a solution or provide sample code for this?

Regards. 

@lauraj46 has a blog post that offers up a clever solution for printing multiple copies of a document:

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


var reportParams = new Dictionary<string, string>();
reportParams.Add("BAccount.BAccount", bAccount.AcctCD);
var printSettings = new PrintSettings
{
PrintWithDeviceHub = true,
DefinePrinterManually = true,
PrinterID = printer.PrinterID,
NumberOfCopies = 1 // Change this?
};

PXLongOperation.StartOperation(Base, delegate ()
{
SMPrintJobMaint g = PXGraph.CreateInstance<SMPrintJobMaint>();
g.AddPrintJob("Print job description", printSettings, "ZRLTTX03", reportParams, null);
});

 


hi @darylbowman.
Thanks for the Solution..

If I click the button, I need the report to open in a new tab the specified number of Copies.
Above Code its not showing report.
 


The code above uses DeviceHub to actual print the report. Are you just asking to open the report a specified number of times?


Yes @darylbowman.

open the report a specified number of times/ copies of same report.


Have a look here: Launch Multiple Reports with one Exception


Reply