{ "header": { "version": 1, "type": "record" }, "body": { "record1": { "<1>": "declare function security_check, set_printer, get_printer, msg, fieldcount, popup,Printer_Select\r\ndeclare subroutine security_err_msg\r\n$insert security_rights_equ\r\n$insert oiprint_equates\r\n$insert msg_equates\r\n$insert popup_equates\r\nequ Mon$ to 1\r\nequ Tue$ to 2\r\nequ Wed$ to 3\r\nequ Thurs$ to 4\r\nequ Fri$ to 5\r\nequ Sat$ to 6\r\nequ Sun$ to 7\r\n\r\n\r\nReselect:\r\nMastSchedPrintOptsPopup = xlate( 'SYSREPOSPOPUPS', @appid<1>:'**WO_MAST_SCHED_PRINT_OPTS', '', 'X' )\r\nDisplay = MastSchedPrintOptsPopup\r\nDisplay = .sched_info->label\r\nconvert @fm to @vm in Display\r\nMastSchedPrintOptsPopup = Display\r\nReturnVal = popup( @window, MastSchedPrintOptsPopup )\r\nCCnt = fieldcount( ReturnVal, @vm )\r\nif CCnt > 7 then\r\n MsgInfo = ''\r\n MsgInfo = 'You may only choose 7 days to print at a given time.'\r\n MsgInfo = 'H'\r\n Void = msg( '', MsgInfo )\r\n goto ReSelect\r\nend\r\n**\r\n\r\nPrintPath = Printer_Select('',1)\t\t;* Get default printer path\r\nStat = set_printer( 'INIT', '', '', '':@fm:'':@fm:0:@fm:'', 1,'',PrintPath )\r\ngosub CheckErr\r\nFont = \"Courier New,12,L,1\"\r\nconvert ',' to @fm in Font\r\nTfont = Font\r\nStat = set_printer( 'FONT', Font )\r\ngosub CheckErr\r\ngosub PrintToF\r\nFont<2> = 9\r\nFont<4> = 0\r\nVoid = set_printer( 'FONT', Font )\r\ngosub CheckErr\r\nVoid = set_printer( 'TEXT', '' )\r\n**\r\nSInfo = .sched_info->array\r\nColHeads = .sched_info->label\r\nconvert @fm to @vm in ColHeads\r\nNewColHeads = ''\r\nfor i = 1 to CCnt\r\n NewColHeads<1,-1> = ColHeads<1,ReturnVal<1,i>>\r\nnext i\r\nTable = ''\r\nTable<1> = 'R#':@vm:NewColHeads\r\nRcnt = fieldcount( SInfo<1>, @vm )\r\nTFont<2> = 9\r\nStat = set_printer( 'FONT', TFont )\r\nfor i = 1 to Rcnt\r\n Tvar = trim(SInfo,i>):trim(SInfo,i>):trim(SInfo,i>):trim(SInfo,i>):trim(SInfo,i>):trim(SInfo,i>):trim(SInfo,i>)\r\n if Tvar = '|||||||' or Tvar = '||||||' then \r\n * Tom puts a '|' when not in use and if it is not in use for all 7 days then don't print\r\n end else\r\n Table<-1> = i:@vm:SInfo,i>:@vm:SInfo,i>:@vm:SInfo,i>:@vm:SInfo,i>:@vm:SInfo,i>:@vm:SInfo,i>:@vm:SInfo,i>\r\n end\r\nnext i\r\nColTableInfo = '>+360':@vm:'<+2044':@vm:'<+2044':@vm:'<+2044':@vm:'<+2044':@vm:'<+2044':@vm:'<+2044':@vm:'<+2044'\r\nx = Set_Printer(\"ADDTABLE\", ColTableInfo, '', Table, '', '', 1, TB_ALL)\r\nstat = set_printer( 'TERM' ) \r\ngosub CheckErr \r\n\r\nRETURN 0\r\n*===========================================================================*\r\nPrintTof:\r\n TFont<1> = 24 ;* THIS IS THE FONT NAME DON'T KNOW WHAT 24 TURNS OUT TO BE BUT LIKE THE PRINT\r\n TFont<3> = 'C'\r\n Stat = set_printer( 'FONT', TFont )\r\n LineOut = ''\r\n LineOut = 'Reactor Setup Scheduler'\r\n Void = set_printer( 'TEXT', LineOut ) \r\n LineOut = 'For the month of ':.month->text\r\n Void = set_printer( 'TEXT', LineOut )\r\n Void = set_printer( 'TEXT', 'WR = Wand Restrictor PS = Pinned Susceptor' ) \r\n Void = set_printer( 'TEXT', '' )\r\nreturn \r\n\r\n*===========================================================================*\r\nCheckErr:\r\n if stat < 0 then\r\n goto FatalExit\r\n end\r\nreturn \r\n\r\n*===========================================================================*\r\nFatalExit:\r\n Void = msg( '', Stat )\r\n Stat = set_printer( 'TERM' )\r\nreturn \r\n\r\n*===========================================================================*\r\n" } } }