home *** CD-ROM | disk | FTP | other *** search
- <<title 'Report Format File Generator'>>
- <<#
-
- <<*---Declare global variables---*>>
- string fpath,fname,fext
- string prgname,fileprefix,datafile
- integer menutype,group
- logical ismultials
- string fldprefix
-
- #>>
- <<*---General modules---*>>
- <<#include 'GENSAY.INC'#>> <<*To generate @row,col SAY,etc.*>>
- <<#include 'GENPRG.INC'#>> <<*Contains GetPrgName,etc.*>>
- <<#include 'GENFILE.INC'#>> <<*Contains GenHeader,GenFooter,etc.*>>
- <<#include 'GENCOLOR.INC'#>> <<*Contains GenColor*>>
- <<*---Application modules---*>>
- <<#include 'REPUTIL.INC'#>>
-
- <<#
- procedure InitGlobals
- begin
- filespec( prgname,fpath,fname,fext ) <<*split 'prgname' to get filename*>>
- fileprefix := substr( fname,1,3 ) <<*use 1st three letters as prefix*>>
- select database 1
- filespec( dbfnam,fpath,datafile,fext ) <<*Init 'datafile'*>>
- select all <<*Reset all scoping*>>
- ismultials := (dbftotal > 1) <<*Using more than 1 database?*>>
- set lmargin to 0 <<*No left margin offset*>>
- set rmargin to 255 <<*No right margin wrap-around*>>
- set AutoMem to false <<*Gen fields*>>
- fldprefix := 'm'
- end <<*InitGlobals*>>
-
-
- procedure GenReport( fspec : string )
- begin
- if OpenFile( fspec,'Report format for ' + datafile + '.DBF' )
- RESEQ by fldrow
- GenReportFile
- GenFooter( fspec )
- endif
- end GenReport
-
-
- begin <<*MAIN*>>
- if Table
- prgname := GetPrgName( "Enter FILENAME of program to GENERATE" )
- if prgname
- InitGlobals
- GenReport( prgname )
- endif
- else
- wait 'No FoxView Table is available '
- endif
- end <<*MAIN*>>
-
- <<*EOF: REPORT.GEN*>>
- #>>