-
Notifications
You must be signed in to change notification settings - Fork 0
/
CAT_LIST.PRG
executable file
·86 lines (86 loc) · 2.01 KB
/
CAT_LIST.PRG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
hide menu main
hide popup all
do printer with 1 in looks
@ 0,1 say"Print COUNTER CATAGORY list" color r/w
define window list from 1,10 to 9,50 double shadow title" Print "
move window list center
activate window list
store 0 to tool
store 1 to devi
@ 0,2 to 6,20 color w/b
@ 0,3 say" Output to: " color w/b
@ 2,4 get devi function'*R Printer;Screen' size 1,10,1
@ 2,24 get tool function'*V Print;Cancel' size 1,10,1
read cycle
if tool=2 .or. tool=0
clear window all
close all
do printer with 0 in looks
do ctop in looks
return .t.
endif
if tool=1
deacti window all
do print_job in looks
if devi=1
set printer to &zoom_printer
else
file_name=".\reports\"+sys(3)+".rep"
set printer to &file_name
endif
store 0 to sno
set printer on
set device to printer
set console off
use &data\catagory shared
set order to cat_code
go top
store 61 to line
store 1 to page
store "-----------------------------------------------------" to _lbreak
do while .not. eof()
if line>60
?space((len(_lbreak)-len(_head(1)))/2)+_head(1)
?space((len(_lbreak)-len(_head(2)))/2)+_head(2)
?space((len(_lbreak)-len(_head(3)))/2)+_head(3)
?space((len(_lbreak)-len(_head(4)))/2)+_head(4)
?" "
?" LIST OF CATAGORIES PAGE -> "+str(page,2)
?_lbreak
?" SERIAL NO | CATAGORY NAME AS DEFINED"
?_lbreak
line=7
endif
SNO=SNO+1
?" "+STR(SNO,9)+" | "+CAT_NAME
line=line+1
SKIP
if line>60
?_lbreak
page=page+1
EJECT
endif
enddo
?_lbreak
eject
set printer to lpt1
set printer off
set device to screen
set console on
deacti window printer
set color to g+/b+,w+/bg+
if devi=2
deacti window all
define window list from 2,5 to 21,75 system title" CATAGORY LIST " color scheme 11
activate window list
modi comm &file_name noedit window list
deacti window list
delete file &file_name
endif
deacti window all
clear window all
close all
do printer with 0 in looks
do ctop in looks
return .t.
endif