Label won't print
Edition: Automation
Version 10.1 SR4
Build 2961
We have a custom program built on MS Access that we use to print labels with various information. The program is setup correctly as all it does is point to a file in the shared drive. I inherited this entire label printing setup and never heard of bartender before I started to work at the company.
I copied LabelA.btw from the shared drive as we needed to update the label. I formatted it how it should be shown and named the file Label.btw.
The old label has the following database connection setup:
Text file on shared folder that contains:
"PackSlipNo","ShipLotNo","Qty","CustRev","CustPartNo","ShipDate","CustPO","Descrip","PartNo","SupplierNum","ID","MyQty","MyPartsPer",
"Dock","City","UserDefined1","UserDefined2","UserDefined3","UserDefined4","SerialNum","Attn","Address1","Address2","Address3",
"State","PostalCode","Country","CITYSTATEZIP"
Values underneath.
The new label has to pull in information that is not in the Access program at this time. So, there is a SQL connection to the table containing the information.
1) Originally, I only had the SQL connection with all the label fields pointed to the appropriate entry.
2) I added a second database connection with an updated Text file. Bartender forced me to 'Join' the databases .I picked PackSlipNo as that would be in Access and the SQL server.
New label text file:
"ID","PackSlipNo","CustID","OrderID","PartID","PartNo","ShipLotNo","Qty","Boxes","LBS","KG","Pieces","ShiptoID","CarrierID","ShipDate",
"CustPO","CustPartNo","CustRev","TrackingNum","Posted","Descrip","DataMatrix","LicensePlate"
Values underneath.
No matter which option I did above, it would not print from Access. It will print manually from Bartender though. After sending the print job from Access, I see it makes it to Commander and treated like it went through until I click on Stop. It will say print jobs are remaining (after examining, it was the Label.btw locking it up) but will only work again once service is stopped and restarted.
In commander, I see the following entry:
[Task Name] A Trigger
[Date/Time] 4/23/2019 12:29:52 PM
[BarTender Command] Command Handler: BarTender1 - C:\PROGRA~1\Seagull\BARTEN~1\BarTend.exe /AF="\\PServer01\BTLabels\Label.btw" /D="\\pserver01\DMXWatch\username042320191229520.old" /PRN="Office" /R=3 /P /DD /C=1
When I open username042320191229520.old, I see:
%BTW% /AF="\\PServer01\BTLabels\Label.btw" /D="%Trigger File Name%" /PRN="Office" /R=3 /P /DD /C=1
%END%
"PackSlipNo","ShipLotNo","Qty","CustRev","CustPartNo","ShipDate","CustPO","Descrip","PartNo","SupplierNum","ID","MyQty","MyPartsPer",
"Dock","City","UserDefined1","UserDefined2","UserDefined3","UserDefined4","SerialNum","Attn","Address1","Address2",
"Address3","State","PostalCode","Country","CITYSTATEZIP","NLBS","GLBS","BOXES"
Values underneath.
Obviously the .old file is missing column names, so that is probably what is making it not work. But, I've spent hours trying to find where it is getting this information from to no avail. Can anyone help?
-
Peter Thane
★ BarTender Hero ★
(This probably should have been posted under the Commander section but never mind)
It sounds to me like the old system was configured as foillows
- BarTender label created with X text fields linked (initially) with a dummy text file containing headings and data so that the fields can be mapped correctly, ie first filed on the label is linked to third filed in the data file which is called "Qry" . The text file setup is told that the file includes headings on the first line.
- At print time Access is set to output a text file, including both the data and appropriate headings in a specific order together with some command codes. These appear between the %BTW% and %END% "brackets" and include specifying the label format to use (AF= .........Label/btw) and the printer to print to (PRN=Office)
- Commander is configured to look for a Commander Script file (due to the trigger containing the "brackets") being created at a specific location and then process the BarTender commands printing the label with data starting from the 3rd row in the file (R=3) although actually the 4th row is used as the label has been told that the file contains filed names.
To change the field headings being output you will need to reconfigure Access to do this.
I cant remember having linked up a Commander trigger file to an SQL database but as Commander runs using a Local System Account as default there could be permissions issues with regards to accessing the SQL table. I no longer have access to Commander but I believe you can amend the user account being used via a Command Handler Setup button on one of the Commander screens.
The locking up sounds to me that there could be an error message being displayed somewhere that you are not able to see due to the account being used to print the labels, and that requires some user input to continue, which you cannot provide.
Hopefully this may give you some pointers
1 -
Peter Thane
★ BarTender Hero ★
AMENDMENT
which is called "Qry"
should have said "Qty"
0 -
Peter Thane
★ BarTender Hero ★
Sorry just going on from other messages, it maybe worthwhile taking a few steps back in the process to try and workout where the point of failure occurs. So you may want to consider (you will need a trigger file ready to use for testing):
- Open the label and adjust the text file setup and remove the includes headings/field names option and then resave it as Label2. Make sure the fields on your label link in the same order as they will be output in the text file and that the SQL fields are connected to the correct field in your SQL database
- Open Commander and on either the Tools or Options or something like that adjust it to run as an application rather than a System Service.
- Stop Detection for the existing task and then start a new Commander not Commander Script task.
- Press the .... button to the right and adjust the commands on the various tabs so that you end up with something similar to the bits between the %xxx% brackets. You may want to make it look for a different file extension than normal just for testing eg a .PRN file and also have it rename the file as something different to (ie not ,old).
- Once complete Start Detection for this task only
- Open up the test trigger file and amend the file to remove all but the fields containing the data
- Save the file using the file extension chosen in 4 and see what happens.
- If it prints then start adding elements back in like re-enabling the field headers, run as a service etc,
- If it did not print then if you can ALT+TAB to see if there are any open message windows and see what they are or respond to these or else check out some of the other settings. Stop and restart detection too to close off any open BarTender controlled by Commander. For example I believe there was an ODBC tab in Commander and you may need to set up the login information for your SQL connection in there
Pete
0 -
Triumph Manufacturing
★ BarTender Hero ★
Peter Thane: At print time Access is set to output a text file, including both the data and appropriate headings in a specific order together with some command codes. These appear between the %BTW% and %END% "brackets" and include specifying the label format to use (AF= .........Label/btw) and the printer to print to (PRN=Office).
Ah, that was it. I looked through the Access code (9000 pages of it...) and found those lines you mentioned. I cannot change it as it will break all of the other labels. The person who originally made it had a habit of making it impossible to 'modify' the code aka no future proofing. I went ahead and changed how I was going to have the label printed and moved it out of needing Access where they will use another computer/label printer that has printstation setup. It will prompt the user in printstation to enter a PackSlipNo and from there it will query the database to auto-fill in the remaining fields.
I upvoted your comment as the answer.
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
4 commentaires