home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
d_b_a
/
87_01
/
repmenu.sc
< prev
next >
Wrap
Text File
|
1986-12-05
|
2KB
|
69 lines
;------------------------------------------ RepMenu.SC
;------------ Display report options and print report.
CLEAR
SHOWMENU
"Directory" : "Directory of Customers",
"Labels" : "Mailing Labels",
"Form Letter" : "Create, Edit, or Print Form Letter",
"None" : "Return to Menu"
TO RChoice
;---------------- If no report selected, return to menu.
IF RChoice = "None" THEN
CLEAR
RETURN
ENDIF
;-------------------------- Make sure printer is ready.
WHILE PRINTERSTATUS() = False
BEEP
STYLE REVERSE, BLINK
@ 12,10 CLEAR EOL
?? "Prepare printer then press any key!"
Nothing = GETCHAR()
ENDWHILE
CLEAR
;-------- Check on sort order, allow only Y or N answer.
Answer = " "
WHILE Answer <> "Y" AND Answer <> "N"
STYLE ATTRIBUTE 30
@ 12,10 CLEAR EOL
?? "Are records already sorted into desired order? (Y/N) "
Answer = UPPER(CHR(GETCHAR()))
?? Answer
ENDWHILE
;-------- Sort if No selected.
IF Answer = "N" THEN
STYLE REVERSE, BLINK
@ 12,10
CLEAR EOL
?? "Sorting records into order first..."
SWITCH
CASE RChoice = "Directory" :
SORT "CustList" ON "Last Name", "First Name"
OTHERWISE :
SORT "CustList" ON "Zip", "Last Name"
ENDSWITCH
STYLE
CLEAR
ENDIF
;-------------------------- Print requested report.
SWITCH
CASE RChoice = "Directory" :
REPORT "CustList" "1"
CASE RChoice = "Labels" :
REPORT "CustList" "2"
CASE RChoice = "Form Letter" :
REPORT "CustList" "3"
ENDSWITCH
CLEARALL
CLEAR