Printing Qty From Multiple Database Fields
Hi,
I'm doing a clothing tag design for a textile company and using their national database, now they have requested that can we print the size onto each clothing tag, but their database doesn't actually have the size it has the size as a header field in the database and the quantity of that size that needs to be printed, my question is can I print each fields quantity and depending on which field quantity it is printing have the corrisponding header printed (or my text) in the sizing text field?
I.e. Size: 5 (10 copies), 6 (5 copies), 7 (0 copies), etc, etc.
I'm perfectly fine to program this in VB Script but I just need a nudge in the right direction. I am using the Data Entry Form for Textile Font Symbols so I can use radio buttons, check buttons, etc, etc.
-
Legacy Poster
★ BarTender Hero ★
Also needing to display database field names if that is possible?
0 -
To source the quantity of labels to print per record from a field value in that record what you need to do is open the "Print" dialog and click on the properties button next to the copies print quantity input box. Choose the "Get quantity from database field" radio button, and then select the field that contains the print quantity value.
I don't think there is an option to display print the database field name in a text object, but is there any problem in creating this manually as static text?
0 -
Legacy Poster
★ BarTender Hero ★
Not sure if that would fix my issue, I need to be able to select each field and print the corrisponding size and it's quantity, if I select all sizes I would need it to print each quantity and the size change automatically. I've got a link below it's a snapshot from our database.
https://drive.google.com/file/d/0B-3YrCR8_AVRbFRNX0U5OERlT1U/view?usp=sharing
0 -
To aid my understanding here: You essentially have X number of product records. Each product/record has a number of size fields available for that product with each size having a numeric value applied that indicates the amount of labels you wish to print for that particular product/size. When printing each record you want it to print X number of labels for each of the sizes, where a text value on the label changes (to indicated the current product size being printed) as each new quantity of labels for each size is to be printed. Is my understanding correct here?
Assuming my understanding is correct it seems to me you would need to hook up two VB scripts. The first to establish the grand total of labels to print per product record which encompasses all sizes you wish to print. The second would be an event based VB script which would change the value of a text object, the one that indicates the product size, in order for the printed label to exhibit the product differentiation by size. The script would need to establish the boundaries and order of when each product size begins and ends, and then using the OnIdenticalCopies event keep a running total of what label number it is at for the current product changing the size text as needed.
Really these product size variations should amount to a different product altogether in terms of the database design, thus you would have individual records per product/size combination. This in turn would make printing labels in BarTender pretty simple.
0 -
Legacy Poster
★ BarTender Hero ★
That sounds correct, could you lead me in the right direction for what VB commands to start with in total of labels to print and then importing the value of the text object to product size? Also how would I set boundaries and order for each size beginning and ends?
would have been nice if they could supply the database with each size being a different product but from what I've been told that this is standard in the textile industry to just have the quantities of each product as a single line just separated by size.
0 -
Legacy Poster
★ BarTender Hero ★
I'm also making a big check box screen so the customer can do the textile care symbols (got about 70 of them), is there a way to start with all the check boxes unchecked on the data entry screen so that the customer just selects the ones they want, otherwise they are un-checking 70 boxes before checking a few.
0 -
For the checkbox question; open up the properties of the linked to data source, select the "Transforms" tab, open properties for the data entry control item, and then make sure that the, "Update data source after print" checkbox is unticked.
0 -
Legacy Poster
★ BarTender Hero ★
Thanks for that, it worked a treat. I've created the check boxes for the different sizes and linked everything up to the quantity fields in the database, now on the OnIdenticalCopies event where would I start? Format>Properties>IdenticalCopiesofLabel maybe? Possibly a If... Then statement? Change the Identical Copies if the CheckBox and change the value of a text field for the size. The total quantity is the last field in the database so we have the total quantity, we just want to change the value of the text field every quantity based on the checked box which gets its quantity from a database field.
0 -
Legacy Poster
★ BarTender Hero ★
Any ideas on this one? All I'm looking for is the software to change the sizing (5,6,7,8,9,10,12,14) based on their corresponding amounts and the total is the last field.
0 -
Legacy Poster
★ BarTender Hero ★
I've been working with the idea on check boxes, but I'm thinking of just automatically printing the quantity and size based on the product selected and on the data entry screen just displaying the quantities it will print with the size.
0 -
Legacy Poster
★ BarTender Hero ★
Hi,
This is my screen shot, I've got another question would it be possible to have multiple quantity fields? So instead of taking the quantities from a database the customer wants to be able to enter in the quantities for each size and then press print, all other data will stay the same and just the sizing will change.
https://drive.google.com/open?id=0B-3YrCR8_AVRSGJsQmFpdW5KOGc
0 -
Create a named data source (eg. varSize5) for each of the product sizes and link them to the text input form controls as per your screenshot. Note that these named data sources do not necessarily have to be used by a label design object. Click the properties button for the print quantity in the Print dialog, set it to a data source containing an event based VB script, and in the expression window sum up the values of each of the named data sources to get the total. Lastly, create an event based VB script, which has a counter that increments by one per label and conditionally, checks to see if it has reached a milestone for each of the product sizes that you have specified. When it does, have your VB script do whatever it is you want it to do to the label for that product.
0 -
Legacy Poster
★ BarTender Hero ★
I've written some code in a data source Event Control Scripts, OnIdenticalCopies section of just a text field. The counter is working and counting up but it doesn't change, do I need to do some other statement instead of IF, THEN?
Format.NamedSubStrings("size").Value = "5"
if Format.NamedSubStrings("varqty").Value <> Format.NamedSubStrings("varsize5").Value Then
Format.NamedSubStrings("size").Value = "6"
Format.NamedSubStrings("varqty").Value = "0"
End If
if Format.NamedSubStrings("varqty").Value <> Format.NamedSubStrings("varsize6").Value Then
Format.NamedSubStrings("size").Value = "7"
Format.NamedSubStrings("varqty").Value = "0"
End If
If Format.NamedSubStrings("varqty").Value <> Format.NamedSubStrings("varsize7").Value Then
Format.NamedSubStrings("size").Value = "8"
Format.NamedSubStrings("varqty").Value = "0"
End If
If Format.NamedSubStrings("varqty").Value <> Format.NamedSubStrings("varsize8").Value Then
Format.NamedSubStrings("size").Value = "9"
Format.NamedSubStrings("varqty").Value = "0"
End If
If Format.NamedSubStrings("varqty").Value <> Format.NamedSubStrings("varsize9").Value Then
Format.NamedSubStrings("size").Value = "10"
Format.NamedSubStrings("varqty").Value = "0"
End If
If Format.NamedSubStrings("varqty").Value <> Format.NamedSubStrings("varsize10").Value Then
Format.NamedSubStrings("size").Value = "12"
Format.NamedSubStrings("varqty").Value = "0"
End If
If Format.NamedSubStrings("varqty").Value <> Format.NamedSubStrings("varsize12").Value Then
Format.NamedSubStrings("size").Value = "14"
Format.NamedSubStrings("varqty").Value = "0"
End If
If Format.NamedSubStrings("varqty").Value <> Format.NamedSubStrings("varsize14").Value Then
Format.NamedSubStrings("size").Value = "5"
Format.NamedSubStrings("varqty").Value = "0"
End If1 -
Legacy Poster
★ BarTender Hero ★
I've also tried to put this code in IdenticalCopies on Copies per Serial Number (Set by Data Source) and then set the serial numbers total to be a database field.
0 -
Legacy Poster
★ BarTender Hero ★
Attached files that you might be able to have a look at.
0
Please sign in to leave a comment.
Comments
15 comments