Print multiple records in a single template
Hi fellow Bartenders,
Howdy! I'm a complete newbie to Bartenders so I'm hoping I'm just being silly and forgot a setting or two.
The goal is to print multiple records in a single label. I've followed this reference kbase, and 1/10, the label prints, but the other 9/10, Bartender returns "No record found" error. I'm genuinely at a lost and can't seem to rundown what the root cause is.
- Reference kbase: How to display multiple records in a single template – BarTender Support Portal (seagullscientific.com)
Infor CloudSuite Industrial is our current ERP and within the ERP, I've created an integration via VisualBasic to build and output the file to a network drive.
str_PrinterName = ThisForm.Variables("V_PrinterName").Value
str_fileName = "\\UNCPATH\Triggers\V_JobMatlPickListLabels_Audit_GPI.csv"
str_outDataStream = "%BTW% /AF=\\UNCPATH\Labels\V_JobMatlPickListLabels_Audit_GPI.btw /D=%Trigger File Name% /PRN="'str_outDataStream = ""
str_outDataStream = str_outDataStream & str_PrinterNamestr_outDataStream = str_outDataStream & " /R=3 /P /DD" & vbCrLf & vbCrLfstr_outDataStream = str_outDataStream & "%END%" & vbCrLf & vbCrLf
With ThisForm
For i = 0 To oSubCollCache.GetNumEntries - 1
str_QtyToPick = Cstr(FormatNumber(oSubCollCache.GetObjectProperty("DerQtyToPick", i),0) )str_QtyToPick = replace (str_QtyToPick, "," , "" )
Const str_Tab As String = Chr(9)
str_outDataStream = str_outDataStream _& Trim(oSubCollCache.GetObjectProperty("Item", i)) & str_Tab _& Trim(oSubCollCache.GetObjectProperty("Job", i)) & str_Tab _& Trim(str_QtyToPick)
str_outDataStream = str_outDataStream & vbCrLfNext i
End With
When I hit Print in the ERP system, Bartender returns "No records found". 9/10, this fails, but 1 out of 10 tries, it does print...
Cheers,
Lele
-
Peter Thane
★ BarTender Hero ★
I would suggest splitting the commands and the data into two files.
For the command file all you would need would be the printer and label format name without any other commands and they could be configured in a File Integration as variables and connected to the Printer and Label Format settings in the Print Document command in the Integration.
The data itself (only) can be output in a separate file that always has the same name and that overwrites any existing file of the same name. The label should be linked to a dummy copy of this data file without the need for any filters.
0 -
Lele Tran
★ BarTender Hero ★
Hi Peter,
Thank you for your response! Awesome, I'll give this a shot and will let you know the result. Thank you!
0 -
Lele Tran
★ BarTender Hero ★
Hi Peter,
Thank you for the suggestion - that worked! I split the command and the data into two separate files and Bartender is no longer complaing about "No record found". I appreciate your time and help. Have a great one! :)
0
Please sign in to leave a comment.
Comments
3 comments