home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a070 / 3.ddi / FOXPRO / TEMPLGEN / REPO1.GEN < prev    next >
Encoding:
Text File  |  1988-05-10  |  1.6 KB  |  60 lines

  1. <<title 'Report Format File Generator'>>
  2. <<#
  3.  
  4. <<*---Declare global variables---*>>
  5. string  fpath,fname,fext
  6. string  prgname,fileprefix,datafile
  7. integer menutype,group
  8. logical ismultials
  9. string  fldprefix
  10.  
  11. #>>
  12. <<*---General modules---*>>
  13. <<#include 'GENSAY.INC'#>>    <<*To generate @row,col SAY,etc.*>>
  14. <<#include 'GENPRG.INC'#>>    <<*Contains GetPrgName,etc.*>>
  15. <<#include 'GENFILE.INC'#>>   <<*Contains GenHeader,GenFooter,etc.*>>
  16. <<#include 'GENCOLOR.INC'#>>  <<*Contains GenColor*>>
  17. <<*---Application modules---*>>
  18. <<#include 'REPUTIL.INC'#>>
  19.  
  20. <<#
  21. procedure InitGlobals
  22. begin
  23.   filespec( prgname,fpath,fname,fext )   <<*split 'prgname' to get filename*>>
  24.   fileprefix := substr( fname,1,3 )      <<*use 1st three letters as prefix*>>
  25.   select database 1
  26.   filespec( dbfnam,fpath,datafile,fext )  <<*Init 'datafile'*>>
  27.   select all                     <<*Reset all scoping*>>
  28.   ismultials := (dbftotal > 1)   <<*Using more than 1 database?*>>
  29.   set lmargin to 0               <<*No left  margin offset*>>
  30.   set rmargin to 255             <<*No right margin wrap-around*>>
  31.   set AutoMem to false           <<*Gen fields*>>
  32.   fldprefix := 'm'
  33. end <<*InitGlobals*>>
  34.  
  35.  
  36. procedure GenReport( fspec : string )
  37. begin
  38.   if OpenFile( fspec,'Report format for ' + datafile + '.DBF' )
  39.     RESEQ by fldrow
  40.     GenReportFile
  41.     GenFooter( fspec )
  42.   endif
  43. end GenReport
  44.  
  45.  
  46. begin <<*MAIN*>>
  47.   if Table
  48.     prgname := GetPrgName( "Enter FILENAME of program to GENERATE" )
  49.     if prgname
  50.       InitGlobals
  51.       GenReport( prgname )
  52.     endif
  53.   else
  54.     wait 'No FoxView Table is available '
  55.   endif
  56. end <<*MAIN*>>
  57.  
  58. <<*EOF: REPORT.GEN*>>
  59. #>>
  60.