home *** CD-ROM | disk | FTP | other *** search
/ Chip: 25 Years Anniversary / CHIP_25Jahre_Jubilaeum.iso / downloads / 400616 / data1.cab / Common-Lexware-LRegEdit-Formular / LRegEdit.lsf < prev    next >
Text File  |  2003-04-01  |  3KB  |  103 lines

  1. '------------------------'------------------------'------------------------
  2. ' Test Formular
  3. Include "DruckNT.int"
  4. '------------------------'------------------------'------------------------
  5.  
  6. declare external Get(s as String, n as Numeric) as String
  7. declare external Is(s as String, n as Numeric) as Bool
  8. declare external GetNumeric(s as String, n as Numeric) as Numeric
  9. declare external GetInt(s as String, n as Numeric) as Numeric
  10. declare external GetDate(s as String, n as Numeric) as Numeric
  11. declare external GetTime(s as String, n as Numeric) as Numeric
  12. declare external FirstRecord(s as String) as Bool
  13. declare external NextRecord(s as String) as Bool
  14. '-------------------'-------------------DESCRIPTION'-------------------'-------------------
  15. description form_description as "Lexware Registrierungseditor"
  16. description form_code as "LRegEdit"
  17.  
  18. description form_version as "2.08.01.0306"
  19. description form_target as "Printer"
  20. description page_orientation as PAGE_LANDSCAPE
  21.  
  22. '-------------------'-------------------MARGINS'-------------------'-------------------
  23. SetHeaderMargin   ( 200, 200, 200, 150 )        ' left top right height
  24. SetBodyMargin     ( 200, 350, 200, 150 )        ' left top right bottom
  25. SetFooterMargin   ( 200, 200, 200, 200 )        ' left top right height
  26.  
  27. '-------------------'-------------------KONSTANTEN'-------------------'-------------------
  28.  
  29. '-------------------'-------------------VARIABLEN'-------------------'-------------------
  30. Dim font as FontType
  31. font = CreateFont("Arial",12,FONT_NORMAL,COLOR_BLACK)
  32. Dim fon as FontType
  33. fon = CreateFont("Arial",10,FONT_NORMAL,COLOR_BLACK)
  34.  
  35. SetWordWrap(TRUE) 
  36. '-------------------'-------------------FUNCTIONS'-------------------'-------------------
  37.  
  38. 'Footer Bereich
  39. function OnPrintFooter()
  40.    RemoveAllTabs()
  41.     SetTabs("L C R")
  42.     SetFont("Arial", 8, FONT_NORMAL, COLOR_BLACK)
  43.     'DrawLineExt (0, 20, 1700, 20)
  44.     DrawHorzLine (True)
  45.     LF
  46.     TL( "⌐ Lexware GmbH & Co. KG 2001 - 2002\t" + FormatDate("%d.%m.%Y", Now()) + "\tSeite " + PAGENUMBER + "  " +GetFormFileName())
  47.     RemoveAllTabs()
  48. end function
  49.  
  50. 'Header Bereich
  51. function OnPrintHeader()
  52.     RemoveAllTabs()
  53.     SetTabs("L C R")
  54.     SetFont("Arial", 14, FONT_BOLD, COLOR_BLACK)
  55.     TL( "Lexware Registrierungseditor")
  56.     SetPen (5, PEN_SOLID, COLOR_BLACK)
  57. '    DrawLineExt (0, 60, 1700, 60)
  58.     DrawHorzLine (True)
  59.     RemoveAllTabs()
  60. end function
  61.  
  62.  
  63. '---------------'---------------EVENT HANDLER'---------------'---------------
  64. SetEventHandler(EVENT_PRINT_FOOTER, OnPrintFooter)
  65. SetEventHandler(EVENT_PRINT_HEADER, OnPrintHeader)
  66.  
  67.  
  68. '---------------'---------------MAIN'---------------'---------------
  69. Dim bG as Bool
  70. Dim wert as STRING
  71.  
  72.  
  73.  
  74. SetFont("Arial", 10, FONT_BOLD, COLOR_BLACK)
  75. RemoveAllTabs()
  76. SetTabs(" L L70 L400 L800 L900")
  77. SetWordWrap(TRUE)
  78. TL("\tSchlⁿssel\tName\tWert")
  79.  
  80. SetFont("Arial", 10, FONT_NORMAL, COLOR_BLACK)
  81. 'DrawLineExt (0, 45, 1700, 45)
  82.     DrawHorzLine (True)
  83.  
  84.  
  85. LF
  86.  
  87. bG = FirstRecord("A")
  88. while bG do
  89.     wert = Get("A",1)
  90.     if (wert <>"") then 
  91.         SetFont("Arial", 10, FONT_BOLD, COLOR_BLACK)
  92.         LF
  93.         TL (wert)
  94.         SetFont("Arial", 10, FONT_NORMAL, COLOR_BLACK)
  95.     else
  96.         TL("\t" + Get("A",2) + "\t" + Get("A",3) + "\t" + Get("A",4))
  97.      end if
  98.     bG = NextRecord("A")
  99. end while
  100. LF
  101.  
  102.  
  103.