Changing copies for an Alternate Label when a database record is not found Follow
I have created a label that pulls data from a stored procedure in SQL Server. Generally when a record is not found, it will leave the fields blank. I'm sending back a specific error message in one of the fields that changes the template that is used.
I have the alternate label working, however if they are printing 75 copies of the label and a database record is not found, they get 75 copies of the error message. I'm trying to find a way to override the number of copies so only one label prints out. I have tried using the following script in the OnPrintJobStart event, but it's not working:
IF Format.Objects("txtErrorMessage").Value = "No BoxQuantity Record Found" THEN _
Job.PrinterCopies = 1
Please sign in to leave a comment.