VB.NET ITEXTSHARP PDF REPORTS
-
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