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

 
Output of file : REPORTS.PRG contained in archive : CANS_101.ZIP
*-----------------------------------------------------------------
*
* System Name: Beer Cans Inventory System
*
* Program Name: REPORTS.PRG
*
* Programmer: Eric L. Poole
* Date: 13 February 1988
*
* Purpose: To provide a reports menu for easily producing
* standard reports and queries, either on-screen
* or on-printer.
*
*-----------------------------------------------------------------

* ---------- Initialize.

do while .t.

set color to w+/b,gr+/ ,b
clear
set talk off
t_date=date()

* ---------- Set indexe(es) off.

set index to

* ---------- Create Menu Options.

opt1 = "1. List Cans by Brand and Size"
opt2 = "2. List Cans by Brewery, Brand and Size"
opt3 = "3. List Cans by Type, Brand and Size"
opt4 = "4. List Cans by Beverage, Brand and Size"
opt5 = "5. List Cans by Grade, Brand and Size"
opt6 = "6. List Cans by Size, Brand and Type"
opt7 = "7. List Cans by US/Foreign, Brand and Size"
opt8 = "8. Search for Data in Any Field"
opt9 = "9. Return to Main Menu"
* ---------- Display the Menu.

set color to r+
@ 1,1 to 3,78 double

set color to b+
@ 2,2 say " * * * "
set color to w+/b
@ 2,3 say dtoc(t_date)
set color to gr+
@ 2,34 say "Reports Menu"
set color to b+
@ 2,46 say " * * * "
set color to w+/b
@ 2,69 say time()
set color to w+/b,gr+/ ,b

@ 5,20 say opt1
@ 6,20 say opt2
@ 7,20 say opt3
@ 8,20 say opt4
@ 9,20 say opt5
@10,20 say opt6
@11,20 say opt7
@12,20 say opt8
@13,20 say opt9

* ---------- Display Instructions with Graphics Characters.

set color to g+/ ,g/ ,b

@ 17,10 to 20,68 double

set color to gr/ ,gr+/ ,b

@ 18,11 say " Highlight option by using "
set color to bg+/
@ 18,44 say chr(24)
set color to gr/
@ 18,45 say " or "
set color to bg+/
@ 18,49 say chr(25)
set color to gr/
@ 18,50 say " and press "
set color to rb+/
@ 18,61 say chr(17)+chr(217)
set color to gr/
@ 18,63 say " "
@ 19,11 say " or press appropriate menu number "

set color to w+/b,gr+/ ,b

* ---------- Initialize Memory Variables.

opt = 1
sub = str(opt,1)
keypress = 0
choice = 0

* ---------- Reverse Video on Option 1.

@ 5,20 get opt1
clear gets

* ---------- Loop for Selecting Menu Options.

redraw = "N"

do while redraw = "N"

* ---------- Wait for a Key Press.

keypress = 0

do while keypress = 0
keypress = inkey()
@ 2,69 say time()
enddo (keypress)

* ---------- Arrow Key Pressed.

if keypress = 24 .or. keypress = 5
@ opt+4,20 say opt&sub
opt=iif(keypress=24,opt+1,opt-1)
opt=iif(opt>9,1,opt)
opt=iif(opt<1,9,opt)
sub=str(opt,1)
@ opt+4,20 get opt&sub
clear gets
loop
endif

* ---------- Option Number Entered.

if keypress >= 49 .and. keypress <= 57
choice = keypress-48
endif

* ---------- Return Key Pressed.

if keypress = 13
choice = opt
endif

* ---------- An Option was Selected.

do case
case choice = 1
do report1.prg
redraw = "Y"
case choice = 2
do report2.prg
redraw = "Y"
case choice = 3
do report3.prg
redraw = "Y"
case choice = 4
do report4.prg
redraw = "Y"
case choice = 5
do report5.prg
redraw = "Y"
case choice = 6
do report6.prg
redraw = "Y"
case choice = 7
do report7.prg
redraw = "Y"
case choice = 8
do report8.prg
redraw = "Y"
case choice = 9

* ---------- Return to Reports Menu.

clear
return

endcase

enddo (while redraw = "N")

enddo (while .t.)



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