Foxtable(狐表)用户栏目专家坐堂 → 专业报表


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

主题:专业报表

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


加好友 发短信
等级:超级版主 帖子:113660 积分:578843 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2025/4/30 11:34:00 [显示全部帖子]

Dim i1 As Integer = 1
Dim i2 As Integer = 1
For Each r As Row In Tables("表A").Rows
    If r.IsNull("一级标题") = False Then
        s = "第" & i1 & "章  " & r("一级标题")
        i1 += 1
        i2 = 1
        rt = New prt.RenderText
        rt.Text = s '设置文本对象的内容
        rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
        rt.Style.Font = New Font("黑体", 16, FontStyle.Bold) '设置字体
        rt.Style.Spacing.top = 5 '设置上间隔为5毫米
        '        rt.Style.Spacing.Bottom = 5 '设置下间隔为5毫米
        rt.Style.LineSpacing = 200 '2.0倍行距
        doc.Body.Children.Add(rt) '将文本对象加入到报表
        s = "第" & i2 & "节  " & r("二级标题")
        i2 += 1
        rt = New prt.RenderText
        rt.Text = s '设置文本对象的内容
        rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
        rt.Style.Font = New Font("黑体", 16, FontStyle.Bold) '设置字体
        rt.Style.Spacing.top = 5 '设置上间隔为5毫米
        '        rt.Style.Spacing.Bottom = 5 '设置下间隔为5毫米
        rt.Style.LineSpacing = 200 '2.0倍行距
        doc.Body.Children.Add(rt) '将文本对象加入到报表
    Else
        s = "第" & i2 & "节  " & r("二级标题")
        i2 += 1
        rt = New prt.RenderText
        rt.Text = s '设置文本对象的内容
        rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
        rt.Style.Font = New Font("黑体", 16, FontStyle.Bold) '设置字体
        rt.Style.Spacing.top = 5 '设置上间隔为5毫米
        '        rt.Style.Spacing.Bottom = 5 '设置下间隔为5毫米
        rt.Style.LineSpacing = 200 '2.0倍行距
        doc.Body.Children.Add(rt) '将文本对象加入到报表
    End If
Next

 回到顶部