Add data to a label when printing from a command line Seguir

0
Avatar
Jim Hogg

I have a label format that I want to print via a command line call and would like to pass a couple of data values to the label, like customer name and shipment number. Would you use a query prompt for this and if so, can you set one up without having a connection to a database? I'm wanting to do something like

bartend.exe /F="C:\BartenderFormats\ShipLabel.btw" /C=1 /PRN="Zebra" /P /X /?CustName="SomeName" /?ShipNbr="1234"

If I use a text file as a database to link, will the query prompt values override the record data? I've tried linking to a text file but it doesn't seem to work.

1 comentarios

0
Avatar
Peter Thane
Acciones de comentarios Permalink

Hi Jim,

Yes you can pass parameters to query prompts without a database connection, although I would normally include these before /P /X commands. 

I am not sure on the 2nd query (override database values) but I do not think it will work. I could be wrong, but I think the command prompt settings would populate the query prompt fields when the label is opened but this would then be overridden by the data drawn in from the database lookup.

If it doesn't working, as it looks like it doesn't from your final comment above there is a possible workaround. What you could do is replace the variable database or prompt value field with an Event Controlled VB script field that prints the database value if the query prompt is empty or a set string value (ie if it = "XXX" for example). For this you would also need to add your query prompt linked field into the label template, but it could be off to the side of the label itself or set to do not print so it does not appear at print time and only the VB value does.

I hope this makes sense

 

Iniciar sesión para dejar un comentario.