Overwriting Quantity Fields Pulled From Data Connection
Hi,
We currently have an ODBC data connection pulling through several fields from our sales database.
At the moment, we have things like part number, quantity, batch number and date being populated based on the order number that we input.
For some shipments, they quantity is broken down. For example one line on the order may be for 100 of the same item but we need to put them into two boxes.
So when the database pulls down the quantity, is there a way to override this if we need to split the shipment and print more than one label?
Thanks in advance.
-
Fernando Ramos Miracle
★ BarTender Hero ★
Hello Hgp-it,
If you are using a "database field" type data source to source the number of copies, you could create a Data Entry Control related to that same data source. This way at print time you would get a prompt with the number of copies to print that you could use to override what's set in the database field.
Note that you'll need to configure the data entry control to prompt on a per record bases, instead of only once at the beginning of the print job.
Regards
0 -
Legacy Poster
★ BarTender Hero ★
Hi thanks for the reply, I appreciate your time.
I don't think I explained myself very well. Its not the number of labels that are printing that we need to change, its one of the values that the SQL query pulls back.
On the odd occasion that we need to break down the order into 2 separate packages, the full quantity won't be within one package so we need 2 labels (e.g 100 spanners are too big and heavy for one box so we would split it into 2 packages, 50 spanners in 2 different boxes) we would need to overwrite the quantity, print 2 labels, each showing a quantity of 50.
I hope I explained myself better this time.
Thank you :-)
0 -
Legacy Poster
★ BarTender Hero ★
You just need to extend Fernando's example to qty on label and qty of labels. So what the user sees is what is pulled down from the database query for the record but they have the ability to overwrite the vales being displayed.
0 -
Legacy Poster
★ BarTender Hero ★
Hi that's great thank you.
I've managed to get this to work by adding a "Date Entry Control" under the Transforms tab and it works when using the BarTender Enterprise software perfectly however this doesnt seem to carry over to the web GUI version.
It has the "Data Entry Form" box with the full quantity in but it will not let me edit it. Can this be changed also?
Many thanks.
0 -
Legacy Poster
★ BarTender Hero ★
Is the read only flag checked on the data entry control text box?
[attachment=1040:7-16-2014 12-44-17 PM.png]
0 -
Legacy Poster
★ BarTender Hero ★
I have checked and the read only option is not selected.
[attachment=1041:ReadONly.JPG]
0 -
What do you mean exactly with web GUI? Do you mean the BarTender Web Print Server by a chance?
Could you attach the BarTender document (.btw) to this topic by making use of the "More Reply Options" button?
0 -
Legacy Poster
★ BarTender Hero ★
What do you mean exactly with web GUI? Do you mean the BarTender Web Print Server by a chance?
Could you attach the BarTender document (.btw) to this topic by making use of the "More Reply Options" button?
Yes that's right, the BarTender Web Print Server. Sorry I am very new to this still.
I have attached the .btw file as requested.
0 -
I'm getting the same behaviour than you when printing from BT-WPS. I will need to contact our developers to find out if this is defined behaviour or not.
0 -
Legacy Poster
★ BarTender Hero ★
That's nice to know that the experts cannot get this to work too. Thanks for your help, I look forward to hearing the next update!
0 -
This is currently defined behaviour in BT-WPS. The reason for this is that BT-WPS does currently not support for the concept of prompting on every record, so this is why the field will be greyed out.
We might have a workaround for you, but this would only work if you print one record at a time. Is that the case with you?
0 -
Legacy Poster
★ BarTender Hero ★
While we are testing and people are getting used to it then we could probably manage with printing one at a time. We could trial the work around and see if it is acceptable.
Is this something that could be developed going forward?
0 -
I've attached a BarTender document and database file for you to examine. Please copy them directly to the documents folder for BT-WPS, which should be "C:\inetpub\wwwroot\BT-WPS\Documents".
Firstly, I've created a query prompt on the database on the first database field. You will need to enter "a" if you want to print the first record, and enter "b" for the second. If you choose the 1st record, then the quantity field will read 1, and you can change it at print time. If you choose the 2nd record the quantity field will now read 2 and can also be modified.
This is possible thanks to some document level VBScript entered at the "OnPrintStart" event in the BarTender document under the "File > BarTender Document Options > VBScripting" dialog. The data source "QuantityDataSource" is the variable name assigned to the data source which corresponds to the quantity.
Yes, we're looking to improve this BT-WPS behaviour in the future.
0 -
Legacy Poster
★ BarTender Hero ★
Thank you for your suggestions and taking the time to do that for us.
Unfortunately it doesn't really do what we need it to do.
It has however given us some other ideas and made the VB Scripting option the most likely way of solving our issues.
As the questions we need to now ask are purely VB Scripting related, we will raise a question over on that part of the forum.
Thanks for all of your help.
0
Please sign in to leave a comment.
Comments
14 comments