Foxtable(狐表)用户栏目专家坐堂 → [求助]专业报表中如何不显示无内容的列


  共有1724人关注过本帖树形打印复制链接

主题:[求助]专业报表中如何不显示无内容的列

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/3/14 12:15:00 [显示全部帖子]

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

 回到顶部