Thomas,
Thanks. There aren't any top borders on the cells below - it's bottom borders only. To confirm this, I've updated the code to turn off any top borders off in all the cells. I'm still having the same problem. The best I can tell, it occurs when the cell below is merged to the right and it goes under the cell that I can't turn the bottom border off on.
Is there any way to fix this? Or would I need to draw a separate table for each row?
My updated code is below.
Thanks,
Aaron
Code:
namesTable = section.AddTable()
namesTable.Style = "Table"
namesTable.Format.Font.Name = "Arial"
namesTable.LeftPadding = 0
namesTable.RightPadding = 0
''col0
column = namesTable.AddColumn("1.5in")
column.Format.Alignment = ParagraphAlignment.Left
''col1
column = namesTable.AddColumn("0.5in")
column.Format.Alignment = ParagraphAlignment.Center
''col2
column = namesTable.AddColumn("1.5in")
column.Format.Alignment = ParagraphAlignment.Center
''col3
column = namesTable.AddColumn("0.5in")
column.Format.Alignment = ParagraphAlignment.Center
''col4
column = namesTable.AddColumn("1.5in")
column.Format.Alignment = ParagraphAlignment.Center
''col5
column = namesTable.AddColumn("0.5in")
column.Format.Alignment = ParagraphAlignment.Center
''col6
column = namesTable.AddColumn("1.0in")
column.Format.Alignment = ParagraphAlignment.Center
row = namesTable.AddRow()
row.Height = "0.17in"
With row.Cells(0)
.AddParagraph("BORING CONTRACTOR")
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Left
.MergeRight = 1
.Borders.Top.Visible = False
End With
With row.Cells(2)
.AddParagraph(myBoring.Contractor_ID)
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Center
.Borders.Bottom.Width = 0.25
.MergeRight = 4
.Borders.Top.Visible = False
End With
row = namesTable.AddRow()
row.Height = "0.17in"
With row.Cells(0)
.AddParagraph("DRILLER")
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Left
.Borders.Top.Visible = False
End With
With row.Cells(1)
.AddParagraph(myBoring.Driller_Name)
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Center
.MergeRight = 1
.Borders.Bottom.Width = 0.25
.Borders.Top.Visible = False
End With
With row.Cells(3)
.AddParagraph("HELPERS")
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Left
.Borders.Bottom.Visible = False
.Borders.Visible = False
.Borders.Top.Visible = False
End With
With row.Cells(4)
.AddParagraph(myBoring.Helper_Name)
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Center
.Borders.Bottom.Width = 0.25
.MergeRight = 2
.Borders.Top.Visible = False
End With
row = namesTable.AddRow()
row.Height = "0.17in"
With row.Cells(0)
.AddParagraph("RESIDENT ENGINEER")
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Left
.MergeRight = 1
.Borders.Top.Visible = False
End With
With row.Cells(2)
.AddParagraph(myBoring.Resident_Engineer_Full_Name)
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Center
.Borders.Bottom.Width = 0.25
.Borders.Top.Visible = False
.MergeRight = 2
End With
With row.Cells(5)
.AddParagraph("DATE")
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Left
.Borders.Top.Visible = False
.Borders.Visible = False
.Borders.Bottom.Visible = False
End With
With row.Cells(6)
'quickly will check for max date
Try
Dim myDC As New mrce_boring_dbOfficeDataClassesDataContext
Dim endDate As Date
Dim myDailyProgressEndDate = (From b In myDC.Boring_Daily_Progresses Where b.BDP_Boring_ID = myBoring.Boring_GUID _
Select b.BDP_End_Date_Time).Max
If Not myDailyProgressEndDate Is Nothing Then
endDate = CDate(myDailyProgressEndDate)
.AddParagraph(Format(endDate.Date, "MM-dd-yy"))
Else
.AddParagraph("")
End If
Catch
.AddParagraph("")
End Try
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Left
.Borders.Bottom.Width = 0.25
.Borders.Top.Visible = False
End With
row = namesTable.AddRow()
row.Height = "0.17in"
With row.Cells(0)
.AddParagraph("CLASSIFICATION CHECK")
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Left
.MergeRight = 1
.Borders.Top.Visible = False
End With
With row.Cells(2)
If myBoring.All_Approved = True Then
.AddParagraph(myBoring.Classification_Checker_Full_Name)
Else
.AddParagraph("OFFICE DRAFT")
End If
.VerticalAlignment = VerticalAlignment.Bottom
.Format.Alignment = ParagraphAlignment.Center
.Borders.Bottom.Width = 0.25
.MergeRight = 4
.Borders.Top.Visible = False
End With
End Sub