我有此问题中描述的确切情况:设备中心与打印机队列的通信
由于这个问题既没有接受也没有可接受的答案,因此我再次提出这个问题。
我已经使用Acumatica配置了DeviceHub,并且显示了我的打印机。我正在通过PXAction发送打印作业。执行该操作后,DeviceHub会记录作业的成功接收,但是打印机队列从未接收到该作业。
这是我的代码,因为这是StackOverflow:
public PXAction<PX.Objects.CR.BAccount> PrintAddressLabel;
[PXButton(CommitChanges=true)]
[PXUIField(DisplayName = "Print Label")]
protected void printAddressLabel()
{
BAccount baccount = Base.Caches[typeof(BAccount)].Current as BAccount;
string bAccountID = baccount.BAccountID.ToString();
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters["BAccountID"] = bAccountID;
PXReportRequiredException ex = null;
ex = PXReportRequiredException.CombineReport(ex, "ZRCRADDR", parameters);
SMPrintJobMaint.CreatePrintJobGroup("DYMOLABEL", ex, "Address Label");
}
Run Code Online (Sandbox Code Playgroud)
有人可以指出我的帮助方向吗?
编辑:
经过进一步测试,我发现:
Acumatica将使用内置的打印过程成功打印到我的DeviceHub打印机。但是,当打印这些作业之一时,DeviceHub日志会显示一个POLL事件。尝试从我的代码打印时,DeviceHub会记录一个NT事件,该事件永远不会进入打印机队列。
经过进一步测试,2019 R1中的日志略有变化。从Acumatica打印发票NT也会导致事件。但是,与在Acumatica中创建的作业和在代码中创建的作业相比,有一行不同。
绿色= Acumatica的工作
橙色=代码中的工作
Printer DYMOLABEL - printing PDF to \\*printer*从代码发送的作业中缺少该行。