home *** CD-ROM | disk | FTP | other *** search
/ Chip: 25 Years Anniversary / CHIP_25Jahre_Jubilaeum.iso / downloads / 400616 / data1.cab / _lohnauskunft-Formulare / lak_nt.int < prev    next >
Text File  |  2003-04-01  |  2KB  |  73 lines

  1. ' Die Lak-spezifischen Deklarationen
  2.  
  3. declare external Get(s as String, n as Numeric) as String
  4. declare external Is(s as String, n as Numeric) as Bool
  5. declare external GetNumeric(s as String, n as Numeric) as Numeric
  6. declare external GetInt(s as String, n as Numeric) as Numeric
  7. declare external GetDate(s as String, n as Numeric) as Numeric
  8. declare external GetTime(s as String, n as Numeric) as Numeric
  9. declare external FirstRecord(s as String) as Bool
  10. declare external NextRecord(s as String) as Bool
  11. declare external FormatAmt(n as Numeric) as String
  12.  
  13. function StrStr(s as String, n as Numeric) as String
  14.     StrStr = Get(s,n)
  15. end function
  16.  
  17. function StrAmt(s as String, n as Numeric) as String
  18.     StrAmt = FormatAmt(GetNumeric(s,n))
  19. end function
  20.  
  21. function StrKfb(s as String, n as Numeric) as String
  22.     StrKfb = FormatNumeric("%0.1f", GetNumeric(s,n))
  23. end function
  24.  
  25. function StrBool(s as String, n as Numeric) as String
  26.     StrBool = "Nein"
  27.     if Is(s,n) then
  28.         StrBool = "Ja"
  29.     end if
  30. end function
  31.  
  32. function StrInt(s as String, n as Numeric) as String
  33.     StrInt = FormatNumeric("%0.0f", GetInt(s,n))
  34. end function
  35.  
  36. function StrDate(s as String, n as Numeric) as String
  37.     StrDate = FormatDate("%d.%m.%Y", GetDate(s,n))
  38. end function
  39.  
  40. function TStr(s as String, n as Numeric)
  41.     T(Get(s,n))
  42. end function
  43.  
  44. function TAmt(s as String, n as Numeric)
  45.     T(StrAmt(s,n))
  46. end function
  47.  
  48. function TInt(s as String, n as Numeric)
  49.     T(StrInt(s,n))
  50. end function
  51.  
  52. function TDate(s as String, n as Numeric)
  53.     T(StrDate(s,n))
  54. end function
  55.  
  56. ' Zelle statt Tabulator, um lange Texte zu begrenzen
  57. function CellAsTab(strText as String, iWidth as Numeric, font as FontType)
  58.     Dim cell as CellType
  59.     Dim x as Numeric
  60.     Dim y as Numeric
  61.     GetPos(x,y)
  62.     cell = CreateCell(iWidth, 0, CELL_TYPE_DYNVERT + CELL_TYPE_CLIP)
  63.     SetCellBorder(cell,CELL_BORDER_LEFT,0,PEN_NULL,0)
  64.     SetCellBorder(cell,CELL_BORDER_TOP,0,PEN_NULL,0)
  65.     SetCellBorder(cell,CELL_BORDER_RIGHT,0,PEN_NULL,0)
  66.     SetCellBorder(cell,CELL_BORDER_BOTTOM,0,PEN_NULL,0)
  67.     SelectCellFont(cell, font )
  68.     SetCellTextBorder(cell,0,0,0,0)
  69.     SetCellText(cell,strText)
  70.     DrawCell(cell,TRUE)
  71.     SetPos(x,y)
  72. end function
  73.