Skip to main content

Search

Search

Form conditions and other issues

Comments

8 comments

  • Avatar
    Peter Thane

    1. You could try adding your statement inside another If...then...else statement that references the Global Objects>Format>IsPrintPreview and so if that is True then your VB wont run so that it only runs when you actually print

    2. Have you tried applying a Sort inside the database look up/query/filter settings so that the highest number is shown at the top? Not sure if that would work but worth a try.

    3. Checkout Reprint Console as that sounds like it will do exactly what you need to do without you having to reinvent the wheel as it were.

    0
  • Avatar
    Chris Yoder

    Thanks for the reply Peter. 

    1. I don't have any VB script running right now, its all a sql if then else statement under the document actions and execute, however, I will try to look into the global objects.

    2. I just tried that in the database connection wizard, and went to sql statement and did a SELECT TOP 1 * FROM tablename ORDER BY column name DESC. This worked and it now only shows the last record in the database. However,  I now have an issue where if I print, it works fine in bartender designer and moves the serial to the next one, and the form starts at whatever number it shows on my template. I then can go to print portal, and find the template and print from there. The form asks for the starting serial number (which is 1 higher than what is should show on the form as that should have been the last barcode printed). I enter the serial number, and everything prints fine. However, when you go to print another batch it sets the form field back to the "sample data" of the data source instead of using the database number itself. I can then go back to designer, and just do a refresh and save. I can reload print portal and it displays the correct information on the next print. Not sure if this is some type of bug or what.

    3. Ive checked into reprint console and looked at some things, but unfortunately it is to limited on what it can do. They have been printing thousands of barcodes a week using excel, and making the barcodes, and taping them to where they go. This obviously is not a best practice, and thats why im trying to implement using labels. If we had to reprint the labels, finding them in reprint console is not a best way, and I want the users to be able to print what they need. 

    0
  • Avatar
    Peter Thane

    2. That is odd, what field is the Data Entry box linked to and what are the properties/settings of that field?

    3. Not ideal but if they know the number they need to reprint could you create an almost identical label but just make the serial number field a manual entry option so they can just type in that number? I am guessing this would not need to log back to your system.

     

    0
  • Avatar
    Chris Yoder

    Peter,

     

    I think I have everything working as good as I can for now, except for #2.

     

    It is still giving me fits. I talked with support this morning, and they could not get it to work either. Right now, im still only displaying the last record of the database. My barcode on the screen shows TO-001-6700. The last 4 numbers are the serial number. Each number is its own text box. the 6700 text box has a name data source of Serial, and is setup as a database field that pulls from the colum serial. The number that displays matches what is in the database which is perfect. It also shows sample data of Field: Serial (this is apparently what is used when it can't connect to the database).  I then go to my form template in designer, and when viewing the form it just says enter starting serial number with one text box. That text box is then linked to the named data source Serial. The text box displays the correct information. while viewing the form template in designer. All number match. Good to go right? Wrong. I then go to print in designer, and when the form pops up it says "enter starting serial number" with the one text box, However instead of the data pulling the last serial number that it shows on the template, it shows Field: Serial (this is the sample data of the named Data Source Serial). I cannot for the life of me figure out why it is doing this. It only changes the value on printing, so something is happening when it is going to print or print preview when it asks for that information, it is not able to pull from the database to get the serial number at that exact time. Is there an option i am missing somewhere?

    0
  • Avatar
    Peter Thane

    Is this the only value read from the database as there maybe a workaround? And is it always they have to choose the last number never any other? 

    0
  • Avatar
    Chris Yoder

    They can choose others, but it needs to display the last one so they don't have to remember or worry about if someone else printed labels. They can reprint any that are torn by typing in whatever number it was. The sql statement entered just updates the database if the record already exists, and places a new time stamp and reprinted value in. Therefore it will not be the last record. Support emailed me back and says nobody can figure out why it is doing that. Seems like it might be a bug or something. 

    0
  • Avatar
    Chris Yoder

    Is there a way to just skip the form and just have it print the next serial numbers, and still add them to the database? I don't necessarily even have to have the form. But if i clear it, and try to print, it will print however many I say to print, but not add them to the database. 

    0
  • Avatar
    Peter Thane

    If you filter the database so that the latest serial number is at the top and set the Queried Records on the File>Print screen to first record only then BarTender and Print Station will print the latest number every time. 

    Yes you should be able to skip having the form but you may need to configure where the VB/SQL runs, possibly OnIdenticalCopies would do the trick. 

     

    0

Please sign in to leave a comment.