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 Dim i As Integer = 0 For c As Integer = 0 To tbl.Cols.Count - 1 '生成列标题 Dim idx = tbl.FindRow(tbl.cols(c).name & " Is not null") If idx >= 0 Then rt.Cells(0,i).Text = tbl.Cols(c).Name rt.Cols(i).Width = tbl.Cols(c).PrintWidth i += 1 End If Next
|