Free Support Forum - aspose.com

Table border issue while creating table from database using xml template

Xml:





Vb:

Dim tblFilter As Aspose.Pdf.Generator.Table = SectionMain.Paragraphs("tblFilter")
tblFilter.ImportDataView(CreateDataSourceFilter(), False, 1, CType(0, Byte), 100,1)

Result:

Even if the dt contains only 1 column the pdf table contains 2 columns (s. attachment)

Hi Gunar,


Thanks for contacting support.

As far as I can see from XML file, you have defined one column with 100% width so there should be one column in resultant PDF file. Can you please share the code snippet so that we can test the scenario at our end. We are sorry for this inconvenience.

Here is the snippet:

Private Function CreateDataSourceFilter() As DataView

Try

Dim dtFilter As DataTable
Dim drFilter As DataRow
Dim tmpFilterItem() As String


dtFilter = New DataTable
dtFilter.Columns.Add(New System.Data.DataColumn("FilterText", GetType(String)))

If Not Session("ReportProjectsFilter") Is Nothing Then

Dim tmpFilter() As String = Session("ReportProjectsFilter").ToString.Split("&")

For Each tmpFilterRow As String In tmpFilter


tmpFilterItem = tmpFilterRow.Split("|")

drFilter = dtFilter.NewRow
drFilter("FilterText") = tmpFilterItem(1) & " " & tmpFilterItem(3) & " " & tmpFilterItem(5)
dtFilter.Rows.Add(drFilter)

Next

End If

CreateDataSourceFilter = dtFilter.DefaultView

Catch ex As Exception
CreateDataSourceFilter = Nothing
End Try

Return CreateDataSourceFilter

End Function

Hi Gunar,


Thanks for sharing the code snippet.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-35059. We
will investigate this issue in details and will keep you updated on the status
of a correction. <o:p></o:p>

We apologize for your inconvenience.

The issues you have found earlier (filed as PDFNEWNET-35059) have been fixed in Aspose.Pdf for .NET 7.9.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.