160 lines
3.1 KiB
Plaintext
160 lines
3.1 KiB
Plaintext
COMPILE SUBROUTINE PRINT_AKRION_Test(Dummy)
|
|
|
|
/*
|
|
Print AKRION Test Recipes w/barcodes
|
|
|
|
08/29/1999 JCH - Initial coding - J.C.Henry, Inc. 1999
|
|
*/
|
|
|
|
|
|
DECLARE FUNCTION Set_Printer, Get_Printer, Get_Status, Msg, RGB, Printer_Select, obj_Install
|
|
DECLARE SUBROUTINE Set_Status, ErrMsg, Msg
|
|
|
|
|
|
$INSERT OIPRINT_EQUATES
|
|
$INSERT POPUP_EQUATES
|
|
$INSERT MSG_EQUATES
|
|
|
|
ErrorTitle = 'Error in Stored Procedure "PRINT_AKRION_Test"'
|
|
|
|
AppName = @APPID<1>
|
|
|
|
PopupRec = XLATE('SYSREPOSPOPUPS',AppName:'**AKRION_TEST_RECIPES','','X')
|
|
|
|
IF PopupRec = '' THEN RETURN
|
|
|
|
Width = PopupRec<PWIDTH$>
|
|
Formats = PopupRec<PFORMAT$>
|
|
PopData = PopupRec<PDISPLAY$>
|
|
PTitle = PopupRec<PTITLE$>
|
|
|
|
|
|
**START PRINTING PROCESS**
|
|
|
|
FileName = ''
|
|
Title = PTitle:' Popup Listing':@VM:PTitle:' Popup Listing'
|
|
PageInfo = 1.0:@FM:1.5:@FM:1.0:@FM:0.6
|
|
PageSetup = 0 ;* Portrait
|
|
PrintSetup = 2:@VM:2
|
|
PrintPath = Printer_Select() ;* Select printer without changing default printer
|
|
|
|
IF PrintPath = '' THEN
|
|
Def = ""
|
|
Def<MTYPE$> = "TA3"
|
|
Def<MTEXT$> = 'Destination Printer not Selected..'
|
|
Def<MCAPTION$> = ''
|
|
Def<MICON$> = '*'
|
|
Msg(@WINDOW, Def, '')
|
|
RETURN
|
|
END
|
|
|
|
|
|
stat = Set_Printer("INIT",FileName,Title,PageInfo,PageSetup,PrintSetup,PrintPath)
|
|
|
|
font = "Arial"
|
|
font<2> = "10"
|
|
font<3> = "L"
|
|
font<4> = 0 ;* Normal font
|
|
|
|
|
|
|
|
|
|
location = -0.15:@fm:-1.150:@fm:1.57:@fm:1
|
|
stat = Set_Printer('BMP',obj_Install('Get_Prop','ColorBMP'),location, 0,1)
|
|
|
|
|
|
fontSpacing = 350
|
|
|
|
stat = Set_Printer("FONT",font,fontspacing)
|
|
|
|
font<4> = 1 ;* Bold font
|
|
|
|
stat = Set_Printer("FONTHEADFOOT",font)
|
|
|
|
header = @VM:obj_Install('Get_Prop','CompTitle')
|
|
header<2> = @VM:PTitle
|
|
header<3> = ''
|
|
header<4> = ''
|
|
|
|
stat = Set_Printer("HEADER",header,colLen,colHead,colJust)
|
|
|
|
footer = "Page: 'P' - 'D' 'T'"
|
|
colfooter = ""
|
|
|
|
stat = Set_Printer("FOOTER", footer, colfooter)
|
|
|
|
colHead = ''
|
|
colFmt = ''
|
|
|
|
FOR I = 1 TO COUNT(Formats,@VM) + (Formats NE '')
|
|
ColHead<1,I> = Formats<1,I,6>
|
|
colWide = Formats<1,I,2>
|
|
colWidth = (Formats<1,I,2>/10)*1440
|
|
colJust = ''
|
|
IF Formats<1,I,3> = 'L' THEN colJust = '<'
|
|
IF Formats<1,I,3> = 'C' THEN colJust = '^'
|
|
IF Formats<1,I,3> = 'R' THEN colJust = '>'
|
|
colFmt<1,I> = colJust:colWidth
|
|
NEXT I
|
|
|
|
SWAP @VM WITH @FM IN PopData
|
|
SWAP @SVM WITH @VM IN PopData
|
|
|
|
bcData = ''
|
|
FOR I = 1 TO COUNT(PopData,@FM) + (PopData NE '')
|
|
bcData<I> = '*':PopData<I,1>:'*'
|
|
NEXT I
|
|
|
|
|
|
TableTopPos = Get_Printer('POS')
|
|
|
|
*stat = Set_Printer("ADDTABLE",colFmt,colHead,'','',"",0,TB_TOP)
|
|
|
|
|
|
stat = Set_Printer("ADDTABLE",colFmt,'',PopData,'',"",0,TB_NONE)
|
|
|
|
stat = Set_Printer('POS',TableTopPos)
|
|
|
|
bcFont = ''
|
|
bcFont<1> = '3 of 9 Barcode'
|
|
bcFont<2> = '24'
|
|
bcFont<3> = 'R'
|
|
bcFont<4> = '0'
|
|
|
|
bcFontSpacing = 219 ;*250
|
|
bcFormat = '<4320'
|
|
bcHead = 'BarCode'
|
|
|
|
*stat = Set_Printer("ADDTABLE",bcFormat,bcHead,'','',"",0,TB_TOP:@FM:4.0)
|
|
|
|
|
|
|
|
stat = Set_Printer('FONT',bcFont,bcFontSpacing)
|
|
|
|
stat = Set_Printer('ADDTABLE',bcFormat,'',bcData,'','',0,TB_NONE:@FM:4.0)
|
|
|
|
stat = Set_Printer('FONT',Font,'100')
|
|
|
|
|
|
stat = Set_Printer("TEXT")
|
|
|
|
|
|
stat = Set_Printer("TERM",1)
|
|
|
|
|
|
RETURN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|