Error 3602 with the use of a variable for nbr of copies
Hello,
I've created a new label in designer where the number of labels is calculated on a database value (written in the designer file by the integration).
The number of labels is printed on the label itself but also used as a variable. The number of copies is calculated in VB script and is working fine (printing and all) however when cancelling or closing the document an error 3602 appears which is really anoying to any user. What can be a solution to get rid of this error ?
Fyi , the VBscript:
' -- Convert text to num and calculate number of labels: 1 label / 100 --
Dim inputValue
Dim plage ' Interval for labels (e.g., 100 items per label)
Dim label_limit ' Maximum number of labels allowed
Dim copies ' Calculated number of labels
Dim rest ' Remainder after division
' Initialize values
plage = 100
label_limit = 100
' Convert Value to numeric
inputValue = CInt(Value) ' Ensure Value is numeric before processing
' Calculate the base number of labels and remainder
copies = Int(inputValue / plage)
rest = inputValue Mod plage
' Adjust copies based on conditions
If rest > 0 Then
copies = copies + 1 ' Add 1 if there is a remainder
End If
' Limit copies to maximum allowed
If copies > label_limit Then
copies = label_limit
End If
Value = copies
-
That appears as you have already started the print process and it is telling you that it will not be printing any labels as the quantity is set to zero. You can always turn off the message in the Administer>Application Message Setup
0
Please sign in to leave a comment.
Comments
1 comment