Saltar al contenido principal

Búsqueda

Búsqueda

Pass The Query To A Different .btw File

Comentarios

8 comentarios

  • Avatar
    Legacy Poster

    Nobody got a clue? I was looking at global data field but i do not think this is the right way.

    0
  • Avatar
    Ian Cummings
    Moderador

    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
  • Avatar
    Legacy Poster

    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
  • Avatar
    Ian Cummings
    Moderador

    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
  • Avatar
    Legacy Poster

    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
  • Avatar
    Ian Cummings
    Moderador

    Not sure what I can tell you then as the query prompts as currently implemented just don't work that way.

    0
  • Avatar
    Legacy Poster
    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 = Nothing
    0
  • Avatar
    Ian Cummings
    Moderador

Iniciar sesión para dejar un comentario.