home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a031 / template.exe / AD_REPT.COD < prev    next >
Encoding:
Text File  |  1992-03-10  |  1.4 KB  |  64 lines

  1. //
  2. // Module Name: AD_REPT.COD - Menu_Act = 4
  3. // Selectors  : FRM_Dest, FRM_File, FRM_Headng, FRM_Plain, FRM_Eject,
  4. //            : FRM_Summry, Flter_Cond, Scope, For_Expr, While_Exp
  5. // Description: Call to REPORT
  6. // Syntax     : REPORT FORM <report form file>/?
  7. //                  [PLAIN] [SUMMARY] [NOEJECT] [HEADING <expC>]
  8. //                  [<scope>] [FOR <expL>] [WHILE <expL>] 
  9. //                  [TO [PRINT]/[FILE <expFN>]]
  10. //
  11. *-- Desc: Report
  12. //
  13. {if Flter_Cond then}
  14. SET FILTER TO {Flter_Cond}
  15. GOTO TOP
  16. {endif}
  17. //
  18. {case FRM_Dest of}
  19. {0: // Printer}
  20. SET PRINT ON
  21. {1: // File}
  22. SET ALTERNATE TO {FRM_File}.prt
  23. SET ALTERNATE ON
  24. {3: // Ask at runtime}
  25. gn_pkey = 0
  26. DO PrintSet
  27. IF gn_pkey <> 27  && esc
  28.    \
  29. {endcase}
  30. {if !Item_Prmpt && FRM_Dest == 1 then}
  31. SET MESSAGE TO "Printing to file {FRM_File}.PRT"
  32. {endif}
  33. REPORT FORM {FRM_File}\
  34. {if not FRM_Plain} PLAIN {endif}\
  35. {if FRM_Headng} HEADING "{FRM_Headng}"{endif}\
  36. {if FRM_Eject} NOEJECT {endif}\
  37. {if FRM_Summry} SUMMARY {endif}\
  38. {if !Scope && !For_Expr && !While_Exp then} &gc_scope. {endif}\
  39. {if Scope} {upper(Scope)} {endif}\
  40. {if For_Expr} FOR {For_Expr}{endif}\
  41. {if While_Exp} WHILE {While_Exp}{endif}\
  42.  
  43. {case FRM_Dest of}
  44. {0:}
  45. SET PRINT OFF
  46. {1:}
  47. CLOSE ALTERNATE
  48. {2:}
  49. WAIT
  50. {3:}
  51.    DO Cleanup
  52. ENDIF
  53. {endcase}
  54. //
  55. {if !Item_Prmpt && FRM_Dest == 1 then}
  56. SET MESSAGE TO
  57. {endif}
  58. {if Flter_Cond then}
  59. SET FILTER TO
  60. {endif}
  61. //
  62. // EOP AD_REPT.COD
  63.  
  64.