** Last revision: April 17, 1986 at 18:54 * report.prg STOR .t. TO more1 DO WHIL more1 CLEA STOR 'D' TO dr STOR 'Y' TO printer STOR 'N' TO disk STOR ' ' TO filename STOR ' ' TO comman1 STOR CDOW(DATE())+' '+CMONTH(DATE())+' '+STR(DAY(DATE()),2)+", "+STR(YEAR(DATE()),4) TO mday STOR 'REPORT MENU' TO mode SET COLOR TO &revvideo @ 1,00 @ 1,01 SAY mday @ 1,35 SAY mode SET COLOR TO &stdvideo @ 3,14 SAY "A. Print all data on list" @ 4,14 SAY "B. Print all records updated after a set date" @ 5,14 SAY "C. Print telephone Listing" @ 06,14 SAY "D. Prepare compact listing" @ 07,14 SAY "E. Prepare labels" @ 08,14 SAY "F. Prepare special report" @ 09,14 SAY "G. Display records on screen" @ 10,14 SAY "H. Make WordStar-MailMerge File of all records" @ 11,14 SAY "I. Make WordStar-MailMerge File of part of the records" @ 12,14 SAY "J. Return to Main Menu" @ 16, 0 SAY line @ 17,33 SAY 'SELECT:' DO WHIL AT(comman1,'ABCDEFGHIJQ')=0 @ 17,43 GET comman1 PICTURE '!' READ CLEA GETS ENDD STOR 'Y' TO howmuch STOR SPACE(12) TO much IF (comman1 >='A'.AND.comman1 <='E').OR.(comman1 >='G'.AND.comman1 <= 'I') @ 19,10 SAY 'Do you want to include all records in the file ' @ 19,60 GET howmuch PICTURE '!' READ DO WHIL AT(howmuch,'YN')=0 @ 19,60 GET howmuch PICTURE '!' READ CLEA GETS ENDD IF howmuch = 'N' @ 20,15 SAY 'Which lists do you want to include ' DO WHIL SUBSTR(much,1,1)=' ' @ 20,53 GET much PICTURE '!!!!!!!!!!!!' READ ENDD STOR TRIM(much) TO much STOR LEN(much) TO count STOR "CS1= '"+SUBSTR(much,count,1)+"'" TO fill STOR count -1 TO count DO WHIL count > 0 STOR fill+" .OR.CS1= '"+SUBSTR(much,count,1)+"'" TO fill STOR count -1 TO count ENDD SET FILTER TO &fill GO TOP ENDI howmuch ENDI comman1 IF comman1 >='A' .AND. comman1 < 'E' @ 21,22 SAY "Send Report to the Printer (Y/N)" @ 21,55 GET printer PICTURE '!' READ DO WHIL AT(printer,'YN')=0 @ 21,55 GET printer PICTURE '!' READ ENDD ENDI comman1 IF comman1 >='A' .AND. comman1 < 'E' @ 22,22 SAY "Send Report to a Disk File (Y/N)" @ 22,55 GET disk PICTURE '!' READ DO WHIL AT(disk,'YN')= 0 @ 22,55 GET disk PICTURE '!' READ ENDD IF disk ='Y' @ 22,00 @ 22,22 SAY "Enter Disk File Name" @ 22,44 GET filename PICTURE '!!!!!!!!' @ 22,54 SAY "(.TXT will be added )" READ STOR 'C' TO dr @ 22,00 @ 22,22 SAY 'Select drive to put Files on ' GET dr PICTURE '!' READ DO WHIL AT(dr,'ABC') = 0 @ 22,00 @ 22,22 SAY 'Select drive to put Files on ' GET dr PICTURE '!' READ ENDD while @ ENDI disk = Y IF disk = 'Y' .AND. filename <> ' ' STOR AT('.',filename) TO length IF length = 0 .OR. length > 8 STOR 9 TO length ENDI length STOR SUBSTR(filename,1,length-1) TO filename STOR '&dr.:'+filename+'.TXT' TO filename SET ALTERNATE TO &filename ENDI disk = Y and filename <> '' ENDI disk = Y CLEA DO CASE CASE comman1 = 'A' DO list CASE comman1 = 'B' DO list1 CASE comman1 = 'C' DO phone CASE comman1 = 'D' DO compact CASE comman1 = 'E' DO onelab CASE comman1 = 'F' DO special CASE comman1 = 'H' DO wsfile CASE comman1 = 'I' DO wsfile1 CASE comman1 = 'G' * display the records CLEA @ 02,02 SAY 'Records are displayed by Last names. You may choose the first letter' @ 03,02 SAY 'of the starting location of the records.' SET ESCAPE OFF * get a starting point in file STOR SPACE(8) TO stletter @ 5,02 SAY 'Starting point for the display (up to 8 letters)' @ 5,60 Get stletter PICTURE '!!!!!!!!' READ * goto starting point or next if no find SEEK stletter STOR TRIM(stletter) TO stletter SEEK stletter IF .NOT. found() GO top ENDI .NOT. found CLEA SET ESCAPE OFF STOR .t. TO more10 i = inkey() DO WHILE more10 DISP NEXT 15 lastname, fname, spouse, cs1 @ 22,10 SAY "Hit 'Q' to quit - any other key to continue" SET CONSOL OFF WAIT to i IF i = 'Q' .OR. i = 'q' .OR. EOF() .OR. BOF() STORE .f. TO more10 ENDIF SET CONSOL ON CLEAR ENDDO SET ESCAPE ON CASE comman1 = '?' CLEA TEXT R E P O R T M E N U H E L P This program prepares a number of reports from the mailing list data in addition to preparing WordStar Mailmerge files which you can use to send personalized letters. The Mailmerge options create two files. One is a '.DAT' file which con- tains the names and addresses that WordStar will use to personalize the letter or document you have prepared. The other file is a '.TXT' file which has the introductory information you need to prepare the letter or document which you are going to merge. It is preferable to prepare the draft letter as a separate WordStar doc- ument. When both it and your data base are finalized, run the WordStar option on this program and then after you exit the program open the .TXT file as a 'D' file in WordStar and read in the text of your letter. This text file will then become the basic merge file. Please hit any key to continue.............. ENDT SET CONSOLE OFF WAIT SET CONSOLE ON CLEA CASE comman1 = 'J' .OR. comman1 = 'Q' STOR .f. TO more1 ENDC SET PRINT OFF SET ALTERNATE OFF SET MARGIN TO 0 SET FILTER TO GO TOP ENDD while more1 STOR ' ' TO command STOR .t. TO first RETU