Pass The Query To A Different .btw File
Hi, i have a label from X.btw set up that queries information from an MS SQL database where query ProductName A is the most important field of data i need.
Is there a way that ProductName A is automatically chosen if i want to print it from a DIFFERENT .btw file? I need some way Bartender remembers the searched query chosen from X.btw and continues to use it in a different .btw file.
(i want to print a front and back label where this information is passed on to the back label to a different printer)
-
Legacy Poster
★ BarTender Hero ★
Nobody got a clue? I was looking at global data field but i do not think this is the right way.
0 -
We don't currently support this directly in BarTender, but it is the sort of feature we'd be interested in adding for a future release. If you control BarTender externally via Commander or a front-end application that you make yourself, then you can specify this single query entry value which then produces to print jobs for your front and back label.
0 -
Legacy Poster
★ BarTender Hero ★
Thanks Ian for your reply. Okay, i have an alternative idea how to solve this via Vb scripting but no clue or example how to create this:
In the first label when printing the label create a text file which stores the named data field (productname) into that text field.
When opening the second label it checks in the text file which named data field is mentioned and prints the label with that data field. Is that a solution and if so, can you provide me some help with an example script that writes to a text file?
0 -
I don't think that approach would work or is possible. The query prompts are basic text data entry items, with the VB script being used as a validation/formatting tool. Your better bet is to create an external front-end app to take your data entry input, for it to then pass these entries into the two documents that it then calls off to print.
0 -
Legacy Poster
★ BarTender Hero ★
Sorry that is not an option for us. We only use printstation for our warehouse personnel to enter prompts. No external front end app. Though i do think this might work if just a named data source is written after print job
0 -
Not sure what I can tell you then as the query prompts as currently implemented just don't work that way.
0 -
Legacy Poster
★ BarTender Hero ★
Hi Ian, i found a way using attached script which stores information in an excel file in the same directory as the .btw document. This works only i would like to overwrite it instead of adding this data to each new row. Any idea perhaps how to overwrite instead of inserting it only?
'Place script below at to
'If Format.IsPrinting = False then Exit sub
Dim objCon
Dim strSQL
Set objCon = CreateObject("ADODB.Connection")
'Create connection (in the case of xls file in the same folder as btw file)
objCon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='ProductName.xls';Extended Properties=""Excel 8.0;HDR=YES;"""
objCon.Open
'Create statement
strSQL = "INSERT INTO [productname$] (productname) values ('" & productname & "')"
'Run SQL
objCon.Execute strSQL
'Close connection
objCon.Close
Set objCon = Nothing0 -
This post should set you on the right track: http://forums.seagullscientific.com/index.php?/topic/1687-write-serial-number-back-to-xls-file/
0
Iniciar sesión para dejar un comentario.
Comentarios
8 comentarios