updated reactor print dialog form to allow users to select printer
This commit is contained in:
@ -425,6 +425,38 @@ Service PrintReactorLabel(ReactNo, LoadLockSide=LOAD_LOCK_SIDE)
|
|||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
|
Service GetReactorLabelZPL(ReactNo, LoadLockSide=LOAD_LOCK_SIDE)
|
||||||
|
|
||||||
|
If ( (ReactNo NE '') and (LoadLockSide NE '') ) then
|
||||||
|
BaseZpl = '^XA^MD30^PR1^LH10,10^FO35,5^BY2^B3N,,80,N^FD10SR{ReactNo}.{LoadLockSidePrefix}^FS^FO10,105^A045,90^FB400,1,,C^FDR{ReactNo} {LoadLockSide}^FS^XZ'
|
||||||
|
Convert 'R' to '' in ReactNo
|
||||||
|
If LoadLockSide _EQC 'Both' then
|
||||||
|
LoadLockSidePrefix = 'L'
|
||||||
|
ZplLeft = BaseZpl
|
||||||
|
Swap '{ReactNo}' with ReactNo in ZplLeft
|
||||||
|
Swap '{LoadLockSidePrefix}' with LoadLockSidePrefix in ZplLeft
|
||||||
|
Swap '{LoadLockSide}' with 'Left' in ZplLeft
|
||||||
|
ZplRight = BaseZpl
|
||||||
|
LoadLockSidePrefix = 'R'
|
||||||
|
Swap '{ReactNo}' with ReactNo in ZplRight
|
||||||
|
Swap '{LoadLockSidePrefix}' with LoadLockSidePrefix in ZplRight
|
||||||
|
Swap '{LoadLockSide}' with 'Right' in ZplRight
|
||||||
|
Zpl = ZplLeft:ZplRight
|
||||||
|
end else
|
||||||
|
LoadLockSidePrefix = LoadLockSide[1, 1]
|
||||||
|
Zpl = BaseZpl
|
||||||
|
Swap '{ReactNo}' with ReactNo in Zpl
|
||||||
|
Swap '{LoadLockSidePrefix}' with LoadLockSidePrefix in Zpl
|
||||||
|
Swap '{LoadLockSide}' with LoadLockSide in Zpl
|
||||||
|
end
|
||||||
|
Response = Zpl
|
||||||
|
end else
|
||||||
|
Error_Services('Add', 'Error in ':Service:' service. Null ReactNo or LoadLockSide passed in.')
|
||||||
|
end
|
||||||
|
|
||||||
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service GetReturnToFabLabelZPL(RTFId)
|
Service GetReturnToFabLabelZPL(RTFId)
|
||||||
|
|
||||||
ZPLStringLabel = ''
|
ZPLStringLabel = ''
|
||||||
@ -460,5 +492,3 @@ Service GetReturnToFabLabelZPL(RTFId)
|
|||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ $Insert APP_INSERTS
|
|||||||
$Insert EVENT_SETUP
|
$Insert EVENT_SETUP
|
||||||
$Insert MSG_EQUATES
|
$Insert MSG_EQUATES
|
||||||
|
|
||||||
Declare function Reactor_Services
|
Declare function Reactor_Services, Labeling_Services, Printer_Select
|
||||||
Declare subroutine PlaceDialog, Labeling_Services
|
Declare subroutine PlaceDialog, Labeling_Services
|
||||||
|
|
||||||
GoToEvent Event for CtrlEntId else
|
GoToEvent Event for CtrlEntId else
|
||||||
@ -77,15 +77,30 @@ end event
|
|||||||
|
|
||||||
Event PUB_PRINT.CLICK()
|
Event PUB_PRINT.CLICK()
|
||||||
|
|
||||||
|
ErrorMsg = ''
|
||||||
ReactNo = Get_Property(@Window:'.COB_REACTOR', 'TEXT')
|
ReactNo = Get_Property(@Window:'.COB_REACTOR', 'TEXT')
|
||||||
LLSide = Get_Property(@Window:'.COB_LOAD_LOCK_SIDE', 'TEXT')
|
LLSide = Get_Property(@Window:'.COB_LOAD_LOCK_SIDE', 'TEXT')
|
||||||
Def = ""
|
ReactorZpl = Labeling_Services('GetReactorLabelZPL', ReactNo, LLSide)
|
||||||
Def<MTEXT$> = "Printing label..."
|
If Error_Services('NoError') then
|
||||||
Def<MTYPE$> = "U"
|
PrintPath = Printer_Select()
|
||||||
MsgUp = Msg(@window, Def) ;* display the processing message
|
If PrintPath NE '' then
|
||||||
Labeling_Services('PrintReactorLabel', ReactNo, LLSide)
|
Def = ""
|
||||||
Msg(@window, MsgUp) ;* take down the processing message
|
Def<MTEXT$> = "Printing label..."
|
||||||
If Error_Services('HasError') then Error_Services('DisplayError')
|
Def<MTYPE$> = "U"
|
||||||
|
MsgUp = Msg(@window, Def) ;* display the processing message
|
||||||
|
Msg(@window, MsgUp) ;* take down the processing message
|
||||||
|
Labeling_Services('PrintLabel', ReactorZpl, PrintPath)
|
||||||
|
If Error_Services('HasError') then
|
||||||
|
ErrorMsg = Error_Services('GetMessage')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
ErrorMsg = Error_Services('GetMessage')
|
||||||
|
end
|
||||||
|
|
||||||
|
If ErrorMsg NE '' then
|
||||||
|
Msg(@Window, '', 'OK', '', 'Print Error':@FM:ErrorMsg)
|
||||||
|
end
|
||||||
|
|
||||||
end event
|
end event
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user