Skip to main content

Using 22R2.  We have a customization to print a custom report via Device Hub.  The report is sent to Device Hub but does not print.  The log shows the following:

5/19/2023 3:17:59 PM - Warning] Retrying to retrieve PDF-file for Task #1.1 Print Jobs (Duration: 215.0806 ms.)... (Attempts left: 2).
5/19/2023 3:17:59 PM - Printer] Restart print queue monitor. Reason:Unknown, Context:LoadPdf
5/19/2023 3:17:59 PM - Printer] Logging out...
5/19/2023 3:17:59 PM - Printer] Logged out.
5/19/2023 3:17:59 PM - Warning] Retrying to retrieve PDF-file for Task #1.1 Print Jobs (Duration: 259.5783 ms.)... (Attempts left: 1).
5/19/2023 3:17:59 PM - Printer] Restart print queue monitor. Reason:Unknown, Context:LoadPdf Waiting for completion.
5/19/2023 3:18:00 PM - Printer] Logging in to https://nlacumaticarts.mydomain.com/AcumaticaERP...
5/19/2023 3:18:00 PM - Printer] Initializing printers...
5/19/2023 3:18:00 PM - Printer] Printer BWHP initialized.
5/19/2023 3:18:00 PM - Printer] rError] An error occured while polling the print queue: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ApplicationException: .rpx file extension required

 

From the Print Jobs screen (SM206500), I can preview the job without issue.

The customization is attached.

In the system, is your report named *something*.rpx with a site map entry of AM3020ZZ?


Yes.


I think if you’re giving it a particular printerID to use, you want to set the ‘DefinePrinterManually’ to true.

 

Here’s the code I’ve used to do something similar:

var reportParams = new Dictionary<string, string>();
string bAccountID = Base.CurrentBAccount.Current.BAccountID.ToString();
reportParams.Add("BAccount.BAccountID", bAccountID);
var printSettings = new PrintSettings
{
PrintWithDeviceHub = true,
DefinePrinterManually = true,
PrinterID = printerID
};
SMPrintJobMaint g = PXGraph.CreateInstance<SMPrintJobMaint>();
g.AddPrintJob("Address label (MB)", printSettings, "CRADBAMB", reportParams, null);

I’m not exactly sure what the difference is between ‘AddPrintJob’ and ‘CreatePrintJob’.


Reply