Zum Hauptinhalt gehen

Suche

Suche

Preventing A Printout Until A Tare Weight Is Met

Kommentare

1 Kommentar

  • Avatar
    Legacy Poster

    I am unable to test it at the moment but so far I have this on the OnPrintJobStart event:

     

    'Executes at the start of a print job.
    If IsNumeric(Format.NamedSubStrings("WeightFromScale").Value) then
        'Current weight is greater than tare weight 
        If CInt(Format.NamedSubStrings("WeightFromScale").Value) > 45 then
            'Has Tare Weight requirement flag been set?
              If ok2Print = true then            
                  'Print Job
                'Reset Tare Weight flag
                  ok2Print = false
              Else
                'Flag has not been set so Tare Weight has not been met, do not print
                  Format.CancelPrinting("Tare Weight Not Met") 
              End If
        Else
            'Tare weight has been made so next stable weight can be printed
            ok2Print = true
            'Do not print
              Format.CancelPrinting("Tare Weight Not Met") 
        End If
    End If 
     
    ok2Print is a flag variable I set under Functions and Subs.
     
    Would something like this work?
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.