Need Help With "x Of Y" Boxes On Label
I currently have the Automation Bartender Version 9.3. I am trying to show "X of Y" on a label based on the box number and total number of boxes.
I figured out easily how to get the serialized "X" part of the equation, my trouble is coming from the "Y". Here is my scenario to better help you understand what is problematic:
I am connecting to a pervasive database using an ODBC connection and I am using a Custom SQL command to bring in the data. I first tried returning the total number of records (which is the "Y" value) by doing a subquery within my sql. That created a glitch within bartendar where it successfully prints the correct "Y" value on every label except the last one.... (Must be a bug because the last label is always a bunch of jibberish. I know this because If I remove that object from the label everyting prints fine even on the last label)
Here is the sql I used to load the report:
SELECT
V_BOL_PACK_DTL.PCK_NO,
V_BOL_PACK_DTL.QTY,
(SELECT COUNT(*) FROM V_BOL_PACK_DTL WHERE V_BOL_PACK_DTL.PCK_NO = '?SHIP_NO' ) AS 'Y_VALUE',
FROM
V_BOL_PACK_DTL
WHERE
V_BOL_PACK_DTL.PCK_NO = '?SHIP_NO'
This should be a valid way to display the total number of records, but it does not work. The last label is always bad and I think it may have something to do with the sub-query timing out before the program displays data... (Just a guess)
Is there any another way to get the total number of records to print?
I also noticed you can use "Format.NumberSerializedLabels", but when I set this to the database field "Y_VALUE", it just ends up making a ton more labels....
-
1. If I understand correctly you wish to serialize a number while printing a single copy of all your database records? Please confirm me this.
2. Can you let me know exactly how are you setting the Y value result of your query to the actual text object on your document?
3. Could you try changing that data source (or substring, as it was called in older BarTender versions) containing the Y value to be an event based VB Script and loading the total number of records in the "OnPrintStart" event? This way it won't change between records (it will be set at print start and stay fixed during the rest of the print job) and you won't risk any kind of "glitch" in the last printed label.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar