home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR7
/
FOXTAILS.ZIP
/
DSPRPT.PRG
< prev
next >
Wrap
Text File
|
1992-06-13
|
1KB
|
45 lines
PROCEDURE Dsprpt
PARAMETER Rpt, Fle, Mmo, Chnge
* Parameters:
* Rpt: Title to appear in top window
* Fle: File name (with path, if necessary) or memo field name
* (memo field if Mmo = .T.)
* Mmo: Is this a Memo Field (.T.) or a File (.F.)
* Cnge: Is this modifiable?
*
*
* Dsprpt will take a file or memo field and create a qick
* a quick display window, along with a title window above
* with editing capabilites (if wanted). This lets the user
* view previously created report files, text files, memo
* fields and other critters easily and consistantly.
IF !Mmo AND !FILE(Fle) && It's a file, but does it exist?
WAIT "File " + Fle + " Doesn't Exist!" WINDOW
RETURN
ENDIF
IF Mmo AND TYPE(Fle)<> "M"
WAIT "Field " + Fle + " isn't a Memo Field" WINDOW
RETURN
ENDIF
DEFINE WINDOW DspRpt1 FROM 1,10 TO 4,69 DOUBLE TITLE Rpt+" Instructions"
DEFINE WINDOW DspRpt2 FROM 6,0 TO 23,79 SYSTEM TITLE Rpt
ACTIVATE WINDOW DspRpt1
@0,15 SAY "Use Arrows - Hit <Esc> to Exit"
@1,15 SAY "Or Click mouse on this Window"
IF Mmo && It's a Memo Field
IF Chnge && Allow Changes?
MODIFY MEMO (Fle) WINDOW DspRpt2
ELSE
MODIFY MEMO (Fle) NOEDIT WINDOW DspRpt2
ENDIF
ELSE && It's a File
IF Chnge && Allow Changes?
MODIFY COMMAND (Fle) WINDOW DspRpt2
ELSE && No changes here...
MODIFY COMMAND (Fle) NOEDIT WINDOW DspRpt2
ENDIF
ENDIF
RELEASE WINDOW DspRpt1,DspRpt2
RETURN