Foxtable(狐表)用户栏目专家坐堂 → 求助:专业报表设计如何实现双面打印呢?


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

主题:求助:专业报表设计如何实现双面打印呢?

帅哥哟,离线,有人找我吗?
李孝春
  11楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2472 积分:17346 威望:0 精华:0 注册:2013/1/31 0:03:00
回复:(有点甜)?关键是,你想说什么?现在什么...  发帖心情 Post By:2014/12/9 19:32:00 [只看该作者]

有点甜老师 现在代码实现了第一页可以显示我需要的效果

我想再生成第二页 让第二页显示第一页的全部内容

也就是说两页的内容都一样 顺序也一样

当实现双面打印后 上下两个表对应裁剪后 纸张两面的内容都是一样的
[此贴子已经被作者于2014-12-9 19:32:17编辑过]

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/9 19:35:00 [只看该作者]

  换页,加入一句

 

rt4.BreakAfter = prt.BreakEnum.Page


 回到顶部
帅哥哟,离线,有人找我吗?
李孝春
  13楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2472 积分:17346 威望:0 精华:0 注册:2013/1/31 0:03:00
回复:(有点甜)? 换页,加入一句?rt4...  发帖心情 Post By:2014/12/9 19:46:00 [只看该作者]

有点甜老师  加过得
 操作效果如下啦

图片点击可在新窗口打开查看此主题相关图片如下:qq图片20141209194602.jpg
图片点击可在新窗口打开查看
不是我想要的效果

我想要的是  两页都是如下显示内容

图片点击可在新窗口打开查看此主题相关图片如下:qq图片20141209194756.jpg
图片点击可在新窗口打开查看

[此贴子已经被作者于2014-12-9 19:46:54编辑过]

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/9 20:00:00 [只看该作者]

Dim doc As New PrintDoc '定义一个报表
doc.PageSetting.PaperKind = 9  '定义纸张为A4

'Dim Currow As Row
'Dim tbl As Table = Tables("卷宗封面")
'For i As Integer = tbl.TopRow To tbl.BottomRow
'CurRow = tbl.rows(i)
For i As Integer = 1 To 2
    Dim ra As New prt.RenderArea '定义一个文本对象
    ra.Width = 130 '对象宽度为163毫米
    ra.Height = 130 '对象高度为192毫米
    Doc.PageSetting.TopMargin = 10 '设置上边距
    Doc.PageSetting.LeftMargin = 25 '设置左边距
    Doc.PageSetting.RightMargin=25
    ''Doc.PageSetting.BottomMargin = 53 '设置下边距
    ra.Style.Borders.All = New prt.Linedef(1, Color.black)
    Doc.Body.Children.Add(ra)
   
    Dim rt2 As New prt.RenderTable() '定义一个表格对象
    rt2.Style.Borders.all = New prt.Linedef(0.1, Color.white, DashStyle.Dot)
    rt2.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    rt2.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    rt2.Style.TextAlignVert = prt.AlignVertEnum.Center
    rt2.Cells(0,0).Style.Font = New Font("宋体", 28 , FontStyle.Bold) '设置文本对象的字体
    rt2.Cells(1,0).Style.Font = New Font("宋体", 20 , FontStyle.Bold) '设置文本对象的字体
    rt2.Style.Font = New Font("宋体", 16, FontStyle.Bold)
    rt2.Cols.Count = 2 '设置列数
    rt2.Rows.Count = 8 '设置行数
    rt2.Height = "128" '设置表格的高度
    rt2.Width = "128" '设置表格的宽度
    rt2.Style.Padding.Top = 0.5 '上边距25毫米
    rt2.Style.Padding.Left = 0.5 '左边距5毫米
    rt2.Style.Padding.Right = 0.5 '右边距5毫米
    rt2.Style.Padding.Bottom= 0.5 '左边距5毫米
    rt2.Cols(0).Width = 30 '设置列宽
    rt2.Cells(0,0).SpanCols = 2
    rt2.Cells(1,0).SpanCols = 2
    rt2.Cells(0,0).Text="贵州省瓮安县人民检察院"
   
   
    rt2.Cells(1,0).Text="贵州省瓮安县人民检察院"
    rt2.Cells(2,0).Text="讯问时间:"
    rt2.Cells(3,0).Text="讯问地点:"
    rt2.Cells(4,0).Text="案件编号:"
    rt2.Cells(5,0).Text="录制编号:"
    rt2.Cells(6,0).Text="光盘编号:"
    rt2.Cells(7,0).Text="录制人员:"
    ra.Children.Add(rt2) '将文本对象加入到报表
   
    Dim rt3 As New prt.RenderTable() '定义一个表格对象
    rt3.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    rt3.Rows.Count = 8 '设置行数
    rt3.Cols.Count = 4 '设置列数
    rt3.Height = "127" '设置表格的高度
    rt3.Width = "162" '设置表格的宽度
    rt3.Cells(0,1).Text="贵州省瓮安县人民检察院"
    rt3.Cells(1,1).Text="贵州省瓮安县人民检察院"
    rt3.Cells(2,1).Text="讯问时间:"
    rt3.Cells(3,1).Text="讯问地点:"
    rt3.Cells(4,1).Text="案件编号:"
    rt3.Cells(5,1).Text="录制编号:"
    rt3.Cells(6,1).Text="光盘编号:"
    rt3.Cells(7,1).Text="录制人员:"
    rt3.Cells(0,0).Text="贵州省瓮安县人民检察院"
    rt3.Cells(0,0).Style.TextAngle = -360
    rt3.Cells(0,3).Text="贵州省瓮安县人民检察院"
    rt3.Cells(0,3).Style.TextAngle = -360
    rt3.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    rt3.Style.TextAlignVert = prt.AlignVertEnum.Center
    rt3.Style.Font = New Font("宋体", 16, FontStyle.Bold)
    rt3.Cells(0,1).Style.Font = New Font("宋体", 23 , FontStyle.Bold) '设置文本对象的字体
    rt3.Cols(0).Width = 8 '设置列宽
    rt3.Cols(1).Width = 30
    'rt3.Cols(2).Width = 6
    rt3.Cols(3).Width = 8
    'rt3.Style.Padding.Top = 5 '上边距25毫米
    'rt3.Style.Padding.Right = 25 '右边距5毫米
    rt3.y = 140  '表水平位置
    rt3.Cells(0,1).SpanCols = 2
    rt3.Cells(1,1).SpanCols = 2
    rt3.Cells(0,0).SpanRows = 8
    rt3.Cells(0,3).SpanRows = 8
   
    doc.Body.Children.Add(rt3)
   
   
   
    Dim rt4 As New prt.RenderTable() '定义一个表格对象
    rt4.Style.Borders.all = New prt.Linedef(0.1, Color.white, DashStyle.Dot)
    rt4.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    rt4.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    rt4.Style.TextAlignVert = prt.AlignVertEnum.Center
    rt4.Cells(0,0).Style.Font = New Font("宋体", 28 , FontStyle.Bold) '设置文本对象的字体
    rt4.Cells(1,0).Style.Font = New Font("宋体", 20 , FontStyle.Bold) '设置文本对象的字体
    rt4.Style.Font = New Font("宋体", 16, FontStyle.Bold)
    rt4.Cols.Count = 2 '设置列数
    rt4.Rows.Count = 8 '设置行数
    rt4.Height = "128" '设置表格的高度
    rt4.Width = "128" '设置表格的宽度
    rt4.Style.Padding.Top = 0.5 '上边距25毫米
    rt4.Style.Padding.Left = 0.5 '左边距5毫米
    rt4.Style.Padding.Right = 0.5 '右边距5毫米
    rt4.Style.Padding.Bottom= 0.5 '左边距5毫米
    rt4.Cols(0).Width = 30 '设置列宽
    rt4.Cells(0,0).SpanCols = 2
    rt4.Cells(1,0).SpanCols = 2
    rt4.Cells(0,0).Text="贵州省瓮安县人民检察院"
   
   
    rt4.Cells(1,0).Text="贵州省瓮安县人民检察院"
    rt4.Cells(2,0).Text="讯问时间:"
    rt4.Cells(3,0).Text="讯问地点:"
    rt4.Cells(4,0).Text="案件编号:"
    rt4.Cells(5,0).Text="录制编号:"
    rt4.Cells(6,0).Text="光盘编号:"
    rt4.Cells(7,0).Text="录制人员:"
    ra.Children.Add(rt4) '将文本对象加入到报表
   
    Dim rt5 As New prt.RenderTable() '定义一个表格对象
    rt5.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    rt5.Rows.Count = 8 '设置行数
    rt5.Cols.Count = 4 '设置列数
    rt5.Height = "127" '设置表格的高度
    rt5.Width = "162" '设置表格的宽度
    rt5.Cells(0,1).Text="贵州省瓮安县人民检察院"
    rt5.Cells(1,1).Text="贵州省瓮安县人民检察院"
    rt5.Cells(2,1).Text="讯问时间:"
    rt5.Cells(3,1).Text="讯问地点:"
    rt5.Cells(4,1).Text="案件编号:"
    rt5.Cells(5,1).Text="录制编号:"
    rt5.Cells(6,1).Text="光盘编号:"
    rt5.Cells(7,1).Text="录制人员:"
    rt5.Cells(0,0).Text="贵州省瓮安县人民检察院"
    rt5.Cells(0,0).Style.TextAngle = -360
    rt5.Cells(0,3).Text="贵州省瓮安县人民检察院"
    rt5.Cells(0,3).Style.TextAngle = -360
    rt5.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    rt5.Style.TextAlignVert = prt.AlignVertEnum.Center
    rt5.Style.Font = New Font("宋体", 16, FontStyle.Bold)
    rt5.Cells(0,1).Style.Font = New Font("宋体", 23 , FontStyle.Bold) '设置文本对象的字体
    rt5.Cols(0).Width = 8 '设置列宽
    rt5.Cols(1).Width = 30
    'rt5.Cols(2).Width = 6
    rt5.Cols(3).Width = 8
    'rt5.Style.Padding.Top = 5 '上边距25毫米
    'rt5.Style.Padding.Right = 25 '右边距5毫米
    'rt5.y = 142  '表水平位置
    rt5.Cells(0,1).SpanCols = 2
    rt5.Cells(1,1).SpanCols = 2
    rt5.Cells(0,0).SpanRows = 8
    rt5.Cells(0,3).SpanRows = 8
   
    doc.Body.Children.Add(rt5)
    If i < 2 Then
    rt5.BreakAfter = prt.BreakEnum.Page
    End If
Next

doc.Preview() '预览


 回到顶部
帅哥哟,离线,有人找我吗?
李孝春
  15楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2472 积分:17346 威望:0 精华:0 注册:2013/1/31 0:03:00
回复:(有点甜)Dim doc As New PrintDoc '定义一个报...  发帖心情 Post By:2014/12/9 20:09:00 [只看该作者]

For i As Integer = 1 To 2    
…………
    If i < 2 Then
    rt5.BreakAfter = prt.BreakEnum.Page
    End If
Next

有点甜老师 我想学习一下  上述代码 我是不是可以这样理解
当i<2时候执行强制换页 

[此贴子已经被作者于2014-12-9 20:11:00编辑过]

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/9 20:11:00 [只看该作者]

 15楼的意思是,从1到2循环,如果不是最后一页,就强制换页。

 回到顶部
帅哥哟,离线,有人找我吗?
李孝春
  17楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2472 积分:17346 威望:0 精华:0 注册:2013/1/31 0:03:00
回复:(有点甜) 15楼的意思是,从1到2循环,如...  发帖心情 Post By:2014/12/9 20:23:00 [只看该作者]

进一步深入学习 假设我现在想做一个三页及三页以上的报表

我是不是需要将2改成3或者三以上

加入了RT6 RT7

那么强制换页的代码是不是要对应的更改为
For i As Integer = 1 To 3
…………

    If i < 3 Then
    rt7.BreakAfter = prt.BreakEnum.Page
    End If
Next


不知道我的理解对不对 应为按照同样的代码 结果得到的效果不是三页相同 而是内容错乱了

求继续指导  谢谢

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/9 20:26:00 [只看该作者]

 你理解正确啊,说的错乱是什么意思,贴上代码

 回到顶部
帅哥哟,离线,有人找我吗?
李孝春
  19楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2472 积分:17346 威望:0 精华:0 注册:2013/1/31 0:03:00
回复:(有点甜) 你理解正确啊,说的错乱是什么...  发帖心情 Post By:2014/12/9 20:31:00 [只看该作者]

运行代码
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:求助代码.txt

运行效果

图片点击可在新窗口打开查看此主题相关图片如下:qq图片20141209203140.jpg
图片点击可在新窗口打开查看


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/9 20:44:00 [只看该作者]

Dim doc As New PrintDoc '定义一个报表
doc.PageSetting.PaperKind = 9  '定义纸张为A4

'Dim Currow As Row
'Dim tbl As Table = Tables("卷宗封面")
'For i As Integer = tbl.TopRow To tbl.BottomRow
'CurRow = tbl.rows(i)
For i As Integer = 1 To 3
    Dim ra As New prt.RenderArea '定义一个文本对象
    ra.Width = 130 '对象宽度为163毫米
    ra.Height = 130 '对象高度为192毫米
    Doc.PageSetting.TopMargin = 10 '设置上边距
    Doc.PageSetting.LeftMargin = 25 '设置左边距
    Doc.PageSetting.RightMargin=25
    ''Doc.PageSetting.BottomMargin = 53 '设置下边距
    ra.Style.Borders.All = New prt.Linedef(1, Color.black)
    Doc.Body.Children.Add(ra)
   
    Dim rt2 As New prt.RenderTable() '定义一个表格对象
    rt2.Style.Borders.all = New prt.Linedef(0.1, Color.white, DashStyle.Dot)
    rt2.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    rt2.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    rt2.Style.TextAlignVert = prt.AlignVertEnum.Center
    rt2.Cells(0,0).Style.Font = New Font("宋体", 28 , FontStyle.Bold) '设置文本对象的字体
    rt2.Cells(1,0).Style.Font = New Font("宋体", 20 , FontStyle.Bold) '设置文本对象的字体
    rt2.Style.Font = New Font("宋体", 16, FontStyle.Bold)
    rt2.Cols.Count = 2 '设置列数
    rt2.Rows.Count = 8 '设置行数
    rt2.Height = "128" '设置表格的高度
    rt2.Width = "128" '设置表格的宽度
    rt2.Style.Padding.Top = 0.5 '上边距25毫米
    rt2.Style.Padding.Left = 0.5 '左边距5毫米
    rt2.Style.Padding.Right = 0.5 '右边距5毫米
    rt2.Style.Padding.Bottom= 0.5 '左边距5毫米
    rt2.Cols(0).Width = 30 '设置列宽
    rt2.Cells(0,0).SpanCols = 2
    rt2.Cells(1,0).SpanCols = 2
    rt2.Cells(0,0).Text="贵州省瓮安县人民检察院"
   
   
    rt2.Cells(1,0).Text="贵州省瓮安县人民检察院"
    rt2.Cells(2,0).Text="讯问时间:"
    rt2.Cells(3,0).Text="讯问地点:"
    rt2.Cells(4,0).Text="案件编号:"
    rt2.Cells(5,0).Text="录制编号:"
    rt2.Cells(6,0).Text="光盘编号:"
    rt2.Cells(7,0).Text="录制人员:"
    ra.Children.Add(rt2) '将文本对象加入到报表
   
    Dim rt3 As New prt.RenderTable() '定义一个表格对象
    rt3.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    rt3.Rows.Count = 8 '设置行数
    rt3.Cols.Count = 4 '设置列数
    rt3.Height = "127" '设置表格的高度
    rt3.Width = "162" '设置表格的宽度
    rt3.Cells(0,1).Text="贵州省瓮安县人民检察院"
    rt3.Cells(1,1).Text="贵州省瓮安县人民检察院"
    rt3.Cells(2,1).Text="讯问时间:"
    rt3.Cells(3,1).Text="讯问地点:"
    rt3.Cells(4,1).Text="案件编号:"
    rt3.Cells(5,1).Text="录制编号:"
    rt3.Cells(6,1).Text="光盘编号:"
    rt3.Cells(7,1).Text="录制人员:"
    rt3.Cells(0,0).Text="贵州省瓮安县人民检察院"
    rt3.Cells(0,0).Style.TextAngle = -360
    rt3.Cells(0,3).Text="贵州省瓮安县人民检察院"
    rt3.Cells(0,3).Style.TextAngle = -360
    rt3.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    rt3.Style.TextAlignVert = prt.AlignVertEnum.Center
    rt3.Style.Font = New Font("宋体", 16, FontStyle.Bold)
    rt3.Cells(0,1).Style.Font = New Font("宋体", 23 , FontStyle.Bold) '设置文本对象的字体
    rt3.Cols(0).Width = 8 '设置列宽
    rt3.Cols(1).Width = 30
    'rt3.Cols(2).Width = 6
    rt3.Cols(3).Width = 8
    'rt3.Style.Padding.Top = 5 '上边距25毫米
    'rt3.Style.Padding.Right = 25 '右边距5毫米
    rt3.y = 140  '表水平位置
    rt3.Cells(0,1).SpanCols = 2
    rt3.Cells(1,1).SpanCols = 2
    rt3.Cells(0,0).SpanRows = 8
    rt3.Cells(0,3).SpanRows = 8
   
    doc.Body.Children.Add(rt3)
   
   
   
    Dim rt4 As New prt.RenderTable() '定义一个表格对象
    rt4.Style.Borders.all = New prt.Linedef(0.1, Color.white, DashStyle.Dot)
    rt4.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    rt4.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    rt4.Style.TextAlignVert = prt.AlignVertEnum.Center
    rt4.Cells(0,0).Style.Font = New Font("宋体", 28 , FontStyle.Bold) '设置文本对象的字体
    rt4.Cells(1,0).Style.Font = New Font("宋体", 20 , FontStyle.Bold) '设置文本对象的字体
    rt4.Style.Font = New Font("宋体", 16, FontStyle.Bold)
    rt4.Cols.Count = 2 '设置列数
    rt4.Rows.Count = 8 '设置行数
    rt4.Height = "128" '设置表格的高度
    rt4.Width = "128" '设置表格的宽度
    rt4.Style.Padding.Top = 0.5 '上边距25毫米
    rt4.Style.Padding.Left = 0.5 '左边距5毫米
    rt4.Style.Padding.Right = 0.5 '右边距5毫米
    rt4.Style.Padding.Bottom= 0.5 '左边距5毫米
    rt4.Cols(0).Width = 30 '设置列宽
    rt4.Cells(0,0).SpanCols = 2
    rt4.Cells(1,0).SpanCols = 2
    rt4.Cells(0,0).Text="贵州省瓮安县人民检察院"
   
   
    rt4.Cells(1,0).Text="贵州省瓮安县人民检察院"
    rt4.Cells(2,0).Text="讯问时间:"
    rt4.Cells(3,0).Text="讯问地点:"
    rt4.Cells(4,0).Text="案件编号:"
    rt4.Cells(5,0).Text="录制编号:"
    rt4.Cells(6,0).Text="光盘编号:"
    rt4.Cells(7,0).Text="录制人员:"
    ra.Children.Add(rt4) '将文本对象加入到报表
   
    Dim rt5 As New prt.RenderTable() '定义一个表格对象
    rt5.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    rt5.Rows.Count = 8 '设置行数
    rt5.Cols.Count = 4 '设置列数
    rt5.Height = "127" '设置表格的高度
    rt5.Width = "162" '设置表格的宽度
    rt5.Cells(0,1).Text="贵州省瓮安县人民检察院"
    rt5.Cells(1,1).Text="贵州省瓮安县人民检察院"
    rt5.Cells(2,1).Text="讯问时间:"
    rt5.Cells(3,1).Text="讯问地点:"
    rt5.Cells(4,1).Text="案件编号:"
    rt5.Cells(5,1).Text="录制编号:"
    rt5.Cells(6,1).Text="光盘编号:"
    rt5.Cells(7,1).Text="录制人员:"
    rt5.Cells(0,0).Text="贵州省瓮安县人民检察院"
    rt5.Cells(0,0).Style.TextAngle = -360
    rt5.Cells(0,3).Text="贵州省瓮安县人民检察院"
    rt5.Cells(0,3).Style.TextAngle = -360
    rt5.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    rt5.Style.TextAlignVert = prt.AlignVertEnum.Center
    rt5.Style.Font = New Font("宋体", 16, FontStyle.Bold)
    rt5.Cells(0,1).Style.Font = New Font("宋体", 23 , FontStyle.Bold) '设置文本对象的字体
    rt5.Cols(0).Width = 8 '设置列宽
    rt5.Cols(1).Width = 30
    'rt5.Cols(2).Width = 6
    rt5.Cols(3).Width = 8
    'rt5.Style.Padding.Top = 5 '上边距25毫米
    'rt5.Style.Padding.Right = 25 '右边距5毫米
    'rt5.y = 142  '表水平位置
    rt5.Cells(0,1).SpanCols = 2
    rt5.Cells(1,1).SpanCols = 2
    rt5.Cells(0,0).SpanRows = 8
    rt5.Cells(0,3).SpanRows = 8
   
    doc.Body.Children.Add(rt5)
    Dim rt6 As New prt.RenderTable() '定义一个表格对象
    rt6.Style.Borders.all = New prt.Linedef(0.1, Color.white, DashStyle.Dot)
    rt6.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    rt6.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    rt6.Style.TextAlignVert = prt.AlignVertEnum.Center
    rt6.Cells(0,0).Style.Font = New Font("宋体", 28 , FontStyle.Bold) '设置文本对象的字体
    rt6.Cells(1,0).Style.Font = New Font("宋体", 20 , FontStyle.Bold) '设置文本对象的字体
    rt6.Style.Font = New Font("宋体", 16, FontStyle.Bold)
    rt6.Cols.Count = 2 '设置列数
    rt6.Rows.Count = 8 '设置行数
    rt6.Height = "128" '设置表格的高度
    rt6.Width = "128" '设置表格的宽度
    rt6.Style.Padding.Top = 0.5 '上边距25毫米
    rt6.Style.Padding.Left = 0.5 '左边距5毫米
    rt6.Style.Padding.Right = 0.5 '右边距5毫米
    rt6.Style.Padding.Bottom= 0.5 '左边距5毫米
    rt6.Cols(0).Width = 30 '设置列宽
    rt6.Cells(0,0).SpanCols = 2
    rt6.Cells(1,0).SpanCols = 2
    rt6.Cells(0,0).Text="贵州省瓮安县人民检察院"
   
   
    rt6.Cells(1,0).Text="贵州省瓮安县人民检察院"
    rt6.Cells(2,0).Text="讯问时间:"
    rt6.Cells(3,0).Text="讯问地点:"
    rt6.Cells(4,0).Text="案件编号:"
    rt6.Cells(5,0).Text="录制编号:"
    rt6.Cells(6,0).Text="光盘编号:"
    rt6.Cells(7,0).Text="录制人员:"
    doc.body.Children.Add(rt6) '将文本对象加入到报表
   
    Dim rt7 As New prt.RenderTable() '定义一个表格对象
    rt7.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    rt7.Rows.Count = 8 '设置行数
    rt7.Cols.Count = 4 '设置列数
    rt7.Height = "127" '设置表格的高度
    rt7.Width = "162" '设置表格的宽度
    rt7.Cells(0,1).Text="贵州省瓮安县人民检察院"
    rt7.Cells(1,1).Text="贵州省瓮安县人民检察院"
    rt7.Cells(2,1).Text="讯问时间:"
    rt7.Cells(3,1).Text="讯问地点:"
    rt7.Cells(4,1).Text="案件编号:"
    rt7.Cells(5,1).Text="录制编号:"
    rt7.Cells(6,1).Text="光盘编号:"
    rt7.Cells(7,1).Text="录制人员:"
    rt7.Cells(0,0).Text="贵州省瓮安县人民检察院"
    rt7.Cells(0,0).Style.TextAngle = -360
    rt7.Cells(0,3).Text="贵州省瓮安县人民检察院"
    rt7.Cells(0,3).Style.TextAngle = -360
    rt7.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    rt7.Style.TextAlignVert = prt.AlignVertEnum.Center
    rt7.Style.Font = New Font("宋体", 16, FontStyle.Bold)
    rt7.Cells(0,1).Style.Font = New Font("宋体", 23 , FontStyle.Bold) '设置文本对象的字体
    rt7.Cols(0).Width = 8 '设置列宽
    rt7.Cols(1).Width = 30
    'rt7.Cols(2).Width = 6
    rt7.Cols(3).Width = 8
    'rt7.Style.Padding.Top = 5 '上边距25毫米
    'rt7.Style.Padding.Right = 25 '右边距5毫米
    'rt7.y = 62  '表水平位置
    rt7.Cells(0,1).SpanCols = 2
    rt7.Cells(1,1).SpanCols = 2
    rt7.Cells(0,0).SpanRows = 8
    rt7.Cells(0,3).SpanRows = 8
   
    doc.Body.Children.Add(rt7)
    If i < 3 Then
        rt7.BreakAfter = prt.BreakEnum.Page
    End If
Next

doc.Preview() '预览

 


 回到顶部
总数 36 上一页 1 2 3 4 下一页