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

 
Output of file : NEWREPS.PRG contained in archive : ADVANCED.ZIP
**************************************************** NEWREPS.PRG
* Print reports from the NewStock file.
* Called from New Stock Menu, NMENU.PRG.

*------- Open Newstock and Master databases.
SELECT 1
USE Newstock
SELECT 2
USE Master INDEX Master

*-------- Set up relationship.
SELECT 1
SET RELATION TO Part_No INTO Master

RepChoice = 0

*------- Start loop for menu
DO WHILE RepChoice # 3

CLEAR
@ 2,1 SAY "New Stock Report Options"
@ 2,60 SAY DTOC(T_Date) + " " + TIME()
@ 3,0 SAY ULine
?
?
TEXT
1. By part number

2. By dates


3. Return to New Stock Menu
ENDTEXT

@ 24,1 SAY "Enter choice (1-3) " GET RepChoice PICT "9"
READ

*------- If not exiting, ask about printer.
@ 5,0 CLEAR
STORE " " TO YN, Printer
IF RepChoice # 3
@ 15,5 SAY "Send to printer? " GET YN PICT "!"
READ

*------- Set up printer macro.
IF YN = "Y"
Printer = "TO PRINT"
ENDIF
ENDIF

*------- Print appropriate report based upon request.
@ 5,0 CLEAR
DO CASE

*------- Case 1: Search by part number.
CASE RepChoice = 1
SET INDEX TO NewStock
NSearch = SPACE(5)
@ 15,5 SAY "Look for what part number?: ";
GET NSearch PICT "!!!!!"
READ
CLEAR
SEEK NSearch
REPORT FORM NewStock WHILE Part_No = NSearch &Printer

*------- Case 2: Search by dates.
CASE RepChoice = 2
SET INDEX TO
STORE SPACE(8) TO Start, End
@ 15,5 SAY "Enter start date " GET Start PICT "99/99/99"
@ 17,5 SAY "Enter end date " GET End PICT "99/99/99"
READ
Start = CTOD(Start)
End = CTOD(End)
CLEAR

*------- Print the report.
REPORT FORM NewStock;
FOR Date >= Start .AND. Date <= End &Printer

ENDCASE

*------- If not going to printer, pause the screen.
IF YN # "Y" .AND. RepChoice # 3
?
?
WAIT "Press any key to return to the Reports Menu..."
ENDIF

ENDDO (while user does not request exit)

*------- When done, return to New Stock Menu.
SET RELATION TO
CLOSE DATABASES
RETURN



  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : ADVANCED.ZIP
Filename : NEWREPS.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/