我使用以下代码打印客户帐户中的地址标签:
public class CustomerMaint_Extension : PXGraphExtension<CustomerMaint>
{
#region PrintAddressLabelNH
public PXAction<Customer> PrintAddressLabelNH;
[PXUIField(DisplayName = "Print address label (NH)", Visible = false)]
protected virtual void printAddressLabelNH()
{
var reportParams = new Dictionary<string, string>();
string bAccountID = Base.CurrentCustomer.Current.BAccountID.ToString();
reportParams.Add("BAccountID", bAccountID);
var printSettings = new PrintSettings
{
PrintWithDeviceHub = true,
DefinePrinterManually = true,
PrinterID = new Guid("22BD7FCA-037C-4A8E-9145-2ADCFBF71BEE"),
NumberOfCopies = 1
};
SMPrintJobMaint g = PXGraph.CreateInstance<SMPrintJobMaint>();
g.AddPrintJob("Address label (NH)", printSettings, "GAARADCU", reportParams, null);
}
#endregion
}
我在“客户”通用查询中将此操作配置为批量操作。其想法是,这是一种让用户批量打印他们过滤到的客户的地址标签的方法。
选择一个客户并使用批量操作按钮“打印地址标签”效果很好。但是以同样的方式选择多个客户会在DeviceHub应用程序中抛出错误(从下到上阅读):
我无法确定可能的原因。有没有人有什么有用的方向?
发布于 2020-08-04 23:04:51
结果是代码和报告都很好。我不得不在DeviceHub中取消勾选“打印时合并每10个文档”。
https://stackoverflow.com/questions/63116358
复制相似问题