是否需要比常规操作更多的批处理操作?
Is there more required of a batch action than a regular action?
我有以下代码可以打印来自客户帐户的地址标签:
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
}
我在 'Customers' 一般查询上将此操作配置为批量操作。这个想法是,这是一种为他们过滤到的客户批量打印地址标签的方式。
选择一位客户并使用批量操作按钮 'Print address labels' 效果很好。但是以相同的方式选择多个客户会在 DeviceHub 应用程序中引发错误(从下到上阅读):
我无法确定可能是什么原因。有人有什么有用的指导吗?
事实证明代码和报告都没有问题。我不得不在 DeviceHub 中取消选中 'Combine every [10] documents on printing'。
我有以下代码可以打印来自客户帐户的地址标签:
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
}
我在 'Customers' 一般查询上将此操作配置为批量操作。这个想法是,这是一种为他们过滤到的客户批量打印地址标签的方式。
选择一位客户并使用批量操作按钮 'Print address labels' 效果很好。但是以相同的方式选择多个客户会在 DeviceHub 应用程序中引发错误(从下到上阅读):
我无法确定可能是什么原因。有人有什么有用的指导吗?
事实证明代码和报告都没有问题。我不得不在 DeviceHub 中取消选中 'Combine every [10] documents on printing'。