Integration Builder - Print Label Using Label's Datasource 关注
First I think I've searched and looked as best I can before posting this, but I'm trying to set up Bartender as a proof of concept in our company.
For reference, I'm running 2016R1, Enterprise Automation Trial
I've created a Bartender label that utilizes a SQL datasource and includes one query prompt. The label works as expected in BarTender. If I print the label, I receive a single query prompt for the containerID. The returned results include a list of the items in the container. The query prompt name is "ContainerID"
Using Page Templates, and Templates, I've got all the records showing as I'd expect.
I'm trying to test setting this up to be used via a webservice.
In Integration builder I've setup a Web Service Integration.
I've named the Service, and specified "unstructured" as my input data format
I'm not sure yet how to use the Response section, but I set %response% = %PrintJobMessage% for the response header.
In Variables I've created 2 variables "ContainerID" and "Document"
I have a single Print Action. "Print Container Label"
The properties for the print action are:
Document - <my documents path>\BarTender Documents\%Document%
Printer - I have this hard coded to the same printer defined in the label itself
I have checked the box for "Prompt for Data Input" below the Job Name field
Query Prompts: ContainerID = %ContainerID%
I'm using the Advanced Rest Client Application.
Query Parameters are
ContainerID = <number>
Document = CrateLabel_Test.btw
Integration builder sees the requests, however every time I try to run it, I receive an error message.
"Print job "CrateLabel_Test.btw' did not complete due to the folowin error: An error occured during BTXML Script processing. Unable to merge BarTender batch database data with document <path to label> because a "btTextFile" database connection was not found"
I have no clue what btTextFile database it's referring to. Any pointers would be greatly appreciated.
In actions, I changed the Database Overrides section to "Use Document Setting" and it actually printed the label, but it is only printing the first record. If I 'print' the label directly from bartender, I have multiple records on the page. Printing it through the integration, I only get the first record.
Edit - again.
Looks like I needed to save the Template for the data, as well as the Page Template. Once I saved my 'changes' for both the Template that displayed my repeating data and saved the changes for my page template, my print jobs worked successfully.