例如以下代码:Dim doc As New PrintDoc
Dim rt As New Prt.RenderTable
Dim rx As prt.RenderText
Dim cnt As Integer
Dim tbl As Table = Tables("订单")
Dim drs As List(Of DataRow)
Dim pds As List(Of String) = tbl.DataTable.GetValues("产品",tbl.Filter)
rt.Style.GridLines.All = New prt.LineDef(0.3,Color.LightGray)
rt.CellStyle.Spacing.All = 1
rt.Style.Font = tbl.Font
For c As Integer = 0 To tbl.Cols.Count - 1 '生成列标题
rt.Cells(0,c).Text = tbl.Cols(c).Name
rt.Cols(c).Width = tbl.Cols(c).PrintWidth
Next
...
如果订单表中的某一列没有任何数据,那么在生成列标题时希望不要生成这个列,请问老师应该如何写代码,谢谢!