Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : ADVANCED.ZIP
Filename : REPORTS.PRG

 
Output of file : REPORTS.PRG contained in archive : ADVANCED.ZIP
**************************************************** REPORTS.PRG
* Set up sort orders and search conditions,
* then print the appropriate report.
* Called from Membership Main Menu.

*------- Open Members database and index files.
USE Members INDEX Names, Zips

CLEAR
@ 2,1 SAY "Report Options"
@ 2,60 SAY DTOC(DATE()) + " " + TIME()
@ 3,0 SAY ULine
?
?
TEXT
1. Mailing labels

2. Directory

3. Form-letter file


4. None (return to Main Menu)
ENDTEXT

MChoice = 0
@ 24,1 SAY "Enter choice (1-4) " GET MChoice PICT "9" RANGE 1,4
READ

IF MChoice = 4
RETURN
ENDIF

*------------------- Ask about sort order.
CLEAR
@ 2,1 SAY "Sort Options"
@ 2,60 SAY DTOC(DATE()) + " " + TIME()
@ 3,0 SAY ULine
?
?
TEXT
1. Alphabetical order by name

2. Zip-code order

3. Original (unsorted) order
ENDTEXT

SChoice = 0
@ 24,1 SAY "Enter choice (1-3)" GET SChoice PICT "9" RANGE 1,3
READ

*------------------- Set up appropriate sort order.
DO CASE
CASE SChoice = 1
SET INDEX TO Names
CASE SChoice = 2
SET INDEX TO Zips
CASE SChoice = 3
USE Members
ENDCASE

*------------------- Ask about query.
CLEAR
AllSome = " "
@ 5,2 SAY "(A)ll records or (Q)uery " ;
GET AllSome PICT "!"
READ

*------------------ Respond to query choice.
IF AllSome = "Q"
MODIFY QUERY Members
ENDIF

*------------------- Print report based on previous MChoice.
CLEAR
STORE " " TO Printer, PMacro

*------- If not making a form-letter file, ask about printer.
IF MChoice < 3
@ 15,5 SAY "Send data to printer? (Y/N) " GET Printer PICT "!"
READ
IF Printer = "Y"
PMacro = "TO PRINT"
WAIT "Prepare printer, then press any key to continue..."
ENDIF
ENDIF

*------- Leave out records marked for deletion.
SET DELETED ON
CLEAR

DO CASE

*------- Print mailing labels.
CASE MChoice = 1
LABEL FORM TwoCol SAMPLE &PMacro

*------- Print directory.
CASE MChoice = 2
DO PrintDi2

*------- Make a form-letter file.
CASE MChoice = 3
Filename = SPACE(14)
SET CONFIRM ON
@ 5,0 CLEAR
@ 15,5 SAY "Enter name of form-letter file (e.g., B:MMERGE.TXT)";
GET Filename
READ
SET CONFIRM OFF
COPY TO &Filename DELIMITED WITH "

ENDCASE

*------------------ Done. Return to Main Menu.
IF Printer = "Y"
EJECT
ENDIF
WAIT "Press any key to return to Main Menu..."
SET DELETED OFF
SET FILTER TO
RETURN


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : ADVANCED.ZIP
Filename : REPORTS.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/