Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. VB.NET ITEXTSHARP PDF REPORTS

VB.NET ITEXTSHARP PDF REPORTS

Scheduled Pinned Locked Moved Database
databasecsharpmysql
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KipkoechE
    wrote on last edited by
    #1

    am creating pdf reports in vb.net Mysql Database but have problems retrieving more than more record...ANy suggestion Here is the code i have tried: #query database getClientDataFromTable() #Add Another Table Here Dim widths() As Single = {50, 70, 100, 100, 100, 100} Dim ColumnHeaders() As String = {"No.", "ACCNO", "NAME", "COUNTY", "OCCUPATION", "PHONE"} Dim ColumnDataExample() As String = {CUSTNO, CUSTName, COUNTY, DATEREGISTERED, PHONE} Dim tbOther As New PdfPTable(widths) With tbOther .TotalWidth = 520 .LockedWidth = True ' lock width to prevent spreading out .HorizontalAlignment = 1 ' centre align content .SpacingAfter = 0 .SpacingBefore = 10 End With '#Add Headers For i As Integer = 0 To UBound(ColumnHeaders) cell = New PdfPCell(New Phrase(ColumnHeaders(i), Fontwhite)) cell.BackgroundColor = New BaseColor(20, 120, 120) cell.BorderColor = New BaseColor(0, 0, 0) If (i > 3) Then cell.HorizontalAlignment = 2 Else cell.HorizontalAlignment = 0 End If tbOther.AddCell(cell) Next i '# Add Data For j As Integer = 0 To 3 - 1 cell = New PdfPCell(New Phrase((j + 1).ToString(), FontNormal)) tbOther.AddCell(cell) For i As Integer = 0 To UBound(ColumnDataExample) cell = New PdfPCell(New Phrase(ColumnDataExample(i), FontNormal)) cell.BorderColor = New BaseColor(20, 120, 120) If (i > 3) Then cell.HorizontalAlignment = 2 Else cell.HorizontalAlignment = 0 End If tbOther.AddCell(cell) Next i Next j '#Add A Blank Line ---------It spans across all 5 columns and borderless i.e border=0 cell = New PdfPCell(New Phrase()) cell.Border = 0 cell.FixedHeight = 30 cell.Colspan = 6 tbOther.AddCell(cell) '# Add A Separator Line Dim separate As New PdfPCell() separate.FixedHeight = 7 'Set Fixed Height To 7 separate.BorderWidthBottom = 4 'separate.BorderWidthTop = 0 separate.BorderColorTop = BaseColor.GREEN separate.Colspan = 6 '#Use This to span across 3 columns tbOther.AddCell(separate) 'add line

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups