Das ist vielleicht, nicht das beste Beispiel, aber das einzigste, das ich gerade zur Hand habe (ohne Datenbankeinbindung):
Code: Alles auswählen
Procedure PDF_PunkteListe(gesamt, titel$) ; PDF Punkteliste
; titel$: kuerzel$ | bez$ | datum$
;{ ========== StartPDFDoc ==========
pdf_Create("P", "mm", #PDF_PAGE_FORMAT_A4)
pdf_SetDisplayMode(#PDF_ZOOM_FULLWIDTH)
;pdf_DisplayPreferences("HideToolbar,DisplayDocTitle")
pdf_SetTitle("Punkteverteilung")
pdf_SetSubject("Punkteverteilung für Notenschlüssels")
pdf_SetAuthor("KvGS - (c) Thorsten Hoeppner")
pdf_SetTopMargin(15)
pdf_SetLeftMargin(15)
pdf_SetRightMargin(15)
pdf_SetAutoPageBreak(1, 15)
pdf_AddPage()
pdf_SetFillColor(224)
;} ==============================
;{ Kopfzeile
pdf_SetFont("Arial","B",18)
pdf_SetXY(20, 15)
pdf_SetFont("Arial", "", 16)
pdf_SetLineWidth(0.4)
pdf_SetFont("Arial", "B", 16)
pdf_Cell(16, 8, StringField(titel$, 1, "|"), 1, 0, #PDF_ALIGN_CENTER)
pdf_SetFont("Arial", "B", 14)
pdf_Cell(135, 8, " "+StringField(titel$, 2, "|"), 1, 0, #PDF_ALIGN_CENTER)
pdf_SetFont("Arial", "B", 14)
pdf_Cell(29, 8, StringField(titel$, 3, "|"), 1, 1, #PDF_ALIGN_CENTER)
pdf_Rect(20, 24, 180, 258)
pdf_SetLineWidth(0.3)
;}
;{ Punkte
pdf_SetXY(30, 31)
pdf_SetFont("Arial", "B", 10)
pdf_Cell(36, 5, "Punkteverteilung", 1, 1, #PDF_ALIGN_CENTER, 1)
For p = gesamt To 1 Step -1
pdf_SetX(30)
pdf_Cell(6, 6, Str(p), -11, 0, #PDF_ALIGN_RIGHT)
pdf_Cell(20, 6, "", -14, 0)
pdf_Cell(10, 6, "", -4, 1)
pdf_SetX(30)
pdf_Cell(6, 2, "", -11, 0)
pdf_Cell(20, 2, "", -14, 0)
pdf_Cell(10, 2, "", -4, 1)
Next p
pdf_SetX(30)
pdf_Cell(6, 6, "0", -11, 0, #PDF_ALIGN_RIGHT)
pdf_Cell(20, 6, "", -14, 0)
pdf_Cell(10, 6, "", -12, 1) ;}
pdf_SetFont("Arial", "", 8)
pdf_SetXY(30,277)
pdf_Cell(0, 4, "| = ganze Punkte "+Chr(149)+" = halbe Punkte")
;{ ========== EndPDFDoc ==========
pdf_Save("C:\Test.pdf")
;} ==============================
Dim punkte.s(0)
EndProcedure
PDF_Liste(25, "DEU|Test-Formular|07.02.06") ; max.28!