Dynamic filter printing with SQL query
Hi all!
I use Bartender to make some additional labelling.
Each carton has it's unique carton number already printed on an existing label as a barcode. I use SQL query to connect Oracle database - it contain all the unique carton numbers in one column and different values related to them in the other columns.
I have to scan the carton number and print a label containing that number and the other related values. Each record is one unique carton number.
My goal is to be able to turn on the window asking me for the carton number and go away from the laptop, equipped only with remote scanner and portable printer. I want to scan the barcodes with carton numbers and get labels printed one by one, so the carton number is scanned > label printed, next carton number scanner > label printed and so on. Could you help me with this?
How it looks now:
I added a text input box on a data entry form and linked the data source "Carton number":
The problem is that in the current situation there is way too much clicking and closing the windows. First I need to select Print from File
Then Print:
Then I get the Select Records window:
I need to select everything and press Print
Only then I get the Data entry form where I can specify the carton number:
Then I click next, and nothing happens but the next data entry form opens again after a while and looks the same:
Finally, when I click Next I will have my label printed, then the data entry form will show again so I can scan next carton and print next label and so on. However, the data on a label is usually messed or I'm getting a wrong label.
Is there a way to skip the whole process until the point where I have a data entry form where I can put the carton number and get a correct label?
-
You could try this:
- Adjust the queried records on the File>Print screen to All
- In the Database Connection setup add a Filter that searches the Carton_Number field and link this to Query Prompt 1. You can configure the Query Prompt settings at this point if you want to or else amend these on the Data Entry Form
- On the Data Entry Form, go into the Properties of your Entry Box and use the Linked option in the column on the left and connect this entry field to Query Prompt 1 on the right.
0 -
Thank you! I think I'm almost there. I added to my query:
AND
Carton_number = ?QueryPrompt1I also created the Text Input Box on the Data Entry Form and connected it to Query Prompt 1.
The problem is that when I click Print in the Print screen, I get an error message saying "missing expression" in dutch (system default language):
If I delete the Text Input Box on the Data Entry Form, after pressing Print I'll get below window:
but when I enter a carton code, I get another error saying "invalid ID":
Could you help?
0 -
You may want to go back a step as it looks like something isnt right with the filter.
In the filter click on the blue field name to get the list of fields to find the column where the scanned variable will be coming from, in your case the carton_number select this and leave the Equals as it is but then click in drop down box. You should see an number of your carton numbers listed in here as well as a New Query Prompt which you should select which should take you to a screen like this.
You may want to amend the Text Label to something appropriate and then click Ok.
If you now click on the Record Browser it should ask you to enter a carton number and if you do this and that works then you should be okay.
0 -
Thank you!
It works now. I added to my query:
AND
Carton_number = ?QueryPrompt1and then made sure that the Query Prompt is configured correctly
0 -
Great, I am glad you are up and running
0
Please sign in to leave a comment.
Comments
5 comments