home *** CD-ROM | disk | FTP | other *** search
- * Callback.prg prints report of customers that need to be
- * contacted
-
- * Get groups of customers to be included in the list
- CLEAR
- @ 3,0 SAY CENTER("FOLLOW-UP LIST GENERATOR")
- @ 7,5 SAY "Select who should be included in follow-up list:"
- @ 9,10 SAY "A. Customers sent brochures but not called back"
- @ 11,10 SAY "B. Customers not contacted in the last 3 months"
- @ 13,10 SAY "C. All customers located in a particular city"
- @ 15,10 SAY "Q. Quit and return to main menu"
- STORE " " TO selectin
- @ 17,5 SAY "Enter selection: ";
- GET selectin PICTURE "!"
- READ
-
- * Formulate filter condition
- STORE " " TO conditn
- DO CASE
- CASE selectin = "A"
- STORE "(Sent_bro .AND. .NOT. Follow_up)" TO conditn
- CASE selectin = "B"
- STORE "(DATE() - Contacted > 90)" TO conditn
- CASE selectin = "C"
- * Get name of customer's city
- STORE SPACE(15) TO cityname
- @ 19,5 SAY "Enter name of city: ";
- GET cityname
- READ
- STORE "(City = cityname)" TO conditn
- CASE selectin = "Q"
- RETURN
- ENDCASE
-
- * Select database Customer with index Lastname
- SELECT Customer
- SET INDEX TO Lastname, Custno, Ziplist
-
- * Set and activate filter
- SET FILTER TO &conditn
- GO TOP
-
- * Print out report
- WAIT " Prepare printer. Press any key to begin printing. "
- SET DEVICE TO PRINT
-
- * Do while not all records have been printed
- DO WHILE .NOT. EOF()
- @ 7,32 SAY "FOLLOW-UP CALLS"
- STORE 10 TO currline
-
- * Do while page is not full
- DO WHILE currline<=50 .AND. .NOT. EOF()
- @ currline,5 SAY TRIM(Firstname) + " " + Lastname
- @ currline,60 SAY Telephone
- @ currline+1,5 SAY Company
- @ currline+2,5 SAY Address
- @ currline+3,5 SAY TRIM(City) + ", " + State + " " + Zip
- IF Sent_bro .AND. .NOT. Follow_up
- @ currline+5,5 SAY "Brochure sent, no follow-up call made"
- ELSE
- @ currline+5,5 SAY "Brochure sent, follow-up call made"
- ENDIF
- @ currline+6,5 SAY "LAST CONTACTED: " + DTOC(Contacted)
- STORE currline+9 TO currline
- SKIP
- ENDDO
- EJECT
- ENDDO
- SET DEVICE TO SCREEN
- SET FILTER TO
- RETURN