Glad to know it works.
The XDP file not only decide page layout but also the data binding. So, as a quick test, you can get XML output of your Query Template and import it to you LiveCycle designer as a "Sample XML Data Connection". Then, you will able to bind data element of the XML with your barcode.
When the XDP is ready, you will able to map your Query Template result with input of ADS printing action node in MII Transaction.
In this way you can see the barcode is changing according to the output of your Query Template.
Let me know if there is still any confusion...
George