Foxtable(狐表)用户栏目专家坐堂 → 表中数据如何用下面这个表套打


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

主题:表中数据如何用下面这个表套打

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


加好友 发短信
等级:小狐 帖子:376 积分:4189 威望:0 精华:0 注册:2008/9/1 14:18:00
表中数据如何用下面这个表套打  发帖心情 Post By:2012/3/15 17:54:00 [只看该作者]

Dim doc As New Printdoc '定义一个报表
doc.PageSetting.PaperKind = 9 '纸张类型改为A4
doc.PageSetting.Landscape = True '横向打印
doc.PageSetting.LeftMargin = 25 '设置左边距
doc.PageSetting.RightMargin = 22 '设置右边距
doc.PageSetting.TopMargin = 25 '设置上边距
doc.PageSetting.BottomMargin = 20 '设置下边距
'For Each dr As DataRow In DataTables("bymc").Select("[校名] = '安胜小学'")
Dim rt As prt.RenderText '定义一个文本对象
rt = New prt.RenderText() '创建文本对象
rt.Text = "附件3:" '设置文本对象的内容
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 16 '字体大小为16磅
rt.Style.TextAlignHorz = prt.AlignHorzEnum.left
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "梁平县中招体育考试成绩登记表" '设置文本对象的内容
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 20 '字体大小为16磅
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "区  县:梁平县" '设置文本对象的内容
rt.X = 24
rt.Y = 55
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "考  场:" '& dr("校名") '设置文本对象的内容
rt.X = 120
rt.Y = 55
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "考生照片" '设置文本对象的内容
rt.X = 245
rt.Y = 38
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
rt.Width = 25 '宽度为40毫米
rt.Height = 35 '宽度为40毫米
rt.Style.Borders.All = New prt.Linedef(0.3, Color.Black) '设置边框
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "学  校:" '& dr("校名") '设置文本对象的内容
rt.X = 24
rt.Y = 62
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "准考证号:" '& dr("校名") '设置文本对象的内容
rt.X = 24
rt.Y = 68
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "姓  名:" '& dr("校名") '设置文本对象的内容
rt.X = 120
rt.Y = 68
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "性  别:" '& dr("校名") '设置文本对象的内容
rt.X = 190
rt.Y = 68
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

Dim bg As New prt.RenderTable() '定义一个表格对象
bg.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
bg.x = 25
bg.y = 75
rt.Width = 258 '设置表格的宽度为258毫米
bg.Height = 90 '
bg.Rows.Count = 5 '设置行数
bg.Cols.Count = 9 '设置列数
For i As Integer = 0 To 9
    bg.Cols(i).Width = 24
Next
bg.Rows(0).Height = 14 '设置行高
bg.Rows(1).Height = 14 '设置行高
bg.Rows(2).Height = 20 '设置行高
bg.Rows(3).Height = 20 '设置行高
bg.Rows(4).Height = 20 '设置行高

bg.Cells(0,0).SpanRows = 2 '第1行第1个单元格向下合并2行
bg.Cells(0,1).SpanCols = 3 '第1行第2个单元格向右合并3列
bg.Cells(0,4).SpanCols = 2 '第1行第5个单元格向右合并2列
bg.Cells(0,6).SpanCols = 4 '第1行第7个单元格向右合并3列
bg.Cells(2,7).SpanRows = 3 '第2行第8个单元格向下合并3行
bg.Cells(4,1).SpanCols = 3 '第5行第1个单元格向右合并3列
bg.cells(0,0).Text = "项目"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(0,1).Text = "成  绩"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(0,4).Text = "最高(终)成绩"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(0,6).Text = "最后得分"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,1).Text = "第一次(表)"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,2).Text = "第二次(表)"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,3).Text = "第三次(表)"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,4).Text = "成绩"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,5).Text = "考生签名"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,6).Text = "单项得分"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,7).Text = "三项总得分"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,8).Text = "登分员签名"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,9).Text = "考务组长签名"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(2,0).Text = "立定跳远(米)"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(3,0).Text = "掷实心球(米)"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(4,0).Text = "一分钟跳绳(次)"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
bg.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
doc.Body.Children.Add(bg) '将表格对象加入到报表中

rt = New prt.RenderText() '创建文本对象
rt.Text = "注:此表为考生原始成绩记录,是输入微机的依据,必须用钢笔填写,不许交考生和无关人员.每项成绩考试后,考生当场签字." '& dr("校名") '设置文本对象的内容
rt.X = 25
rt.Y = 165
rt.Style.TextIndent = 8
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "微机处理后,中招体考成绩入考生升学总分,再将该表装入考生升学档案." '& dr("校名") '设置文本对象的内容
rt.X = 25
rt.Y = 175
rt.Style.TextIndent = 8
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "梁平县中招办盖章" '& dr("校名") '设置文本对象的内容
rt.X = 200
rt.Y = 180
rt.Style.TextIndent = 8
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

'Next
doc.Preview() '预览


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


加好友 发短信
等级:小狐 帖子:376 积分:4189 威望:0 精华:0 注册:2008/9/1 14:18:00
  发帖心情 Post By:2012/3/15 20:53:00 [只看该作者]

狐爸你帮我看看

 


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


加好友 发短信
等级:小狐 帖子:376 积分:4189 威望:0 精华:0 注册:2008/9/1 14:18:00
  发帖心情 Post By:2012/3/15 21:09:00 [只看该作者]

Dim doc As New Printdoc '定义一个报表
doc.PageSetting.PaperKind = 9 '纸张类型改为A4
doc.PageSetting.Landscape = True '横向打印
doc.PageSetting.LeftMargin = 25 '设置左边距
doc.PageSetting.RightMargin = 22 '设置右边距
doc.PageSetting.TopMargin = 25 '设置上边距
doc.PageSetting.BottomMargin = 20 '设置下边距
'For Each dr As DataRow In DataTables("bymc").Select("[校名] = '安胜小学'")
Dim rt As prt.RenderText '定义一个文本对象
rt = New prt.RenderText() '创建文本对象
rt.Text = "附件3:" '设置文本对象的内容
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 16 '字体大小为16磅
rt.Style.TextAlignHorz = prt.AlignHorzEnum.left
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "梁平县中招体育考试成绩登记表" '设置文本对象的内容
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 20 '字体大小为16磅
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "区  县:梁平县" '设置文本对象的内容
rt.X = 24
rt.Y = 55
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "考  场:" '& dr("校名") '设置文本对象的内容
rt.X = 120
rt.Y = 55
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "考生照片" '设置文本对象的内容
rt.X = 245
rt.Y = 38
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
rt.Width = 25 '宽度为40毫米
rt.Height = 35 '宽度为40毫米
rt.Style.Borders.All = New prt.Linedef(0.3, Color.Black) '设置边框
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "学  校:" '& dr("校名") '设置文本对象的内容
rt.X = 24
rt.Y = 62
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "准考证号:" '& dr("校名") '设置文本对象的内容
rt.X = 24
rt.Y = 68
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "姓  名:" '& dr("校名") '设置文本对象的内容
rt.X = 120
rt.Y = 68
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "性  别:" '& dr("校名") '设置文本对象的内容
rt.X = 190
rt.Y = 68
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

Dim bg As New prt.RenderTable() '定义一个表格对象
bg.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
bg.x = 25
bg.y = 75
rt.Width = 258 '设置表格的宽度为258毫米
bg.Height = 90 '
bg.Rows.Count = 5 '设置行数
bg.Cols.Count = 9 '设置列数
For i As Integer = 0 To 9
    bg.Cols(i).Width = 24
Next
bg.Rows(0).Height = 14 '设置行高
bg.Rows(1).Height = 14 '设置行高
bg.Rows(2).Height = 20 '设置行高
bg.Rows(3).Height = 20 '设置行高
bg.Rows(4).Height = 20 '设置行高

bg.Cells(0,0).SpanRows = 2 '第1行第1个单元格向下合并2行
bg.Cells(0,1).SpanCols = 3 '第1行第2个单元格向右合并3列
bg.Cells(0,4).SpanCols = 2 '第1行第5个单元格向右合并2列
bg.Cells(0,6).SpanCols = 4 '第1行第7个单元格向右合并3列
bg.Cells(2,7).SpanRows = 3 '第2行第8个单元格向下合并3行
bg.Cells(4,1).SpanCols = 3 '第5行第1个单元格向右合并3列
bg.cells(0,0).Text = "项目"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(0,1).Text = "成  绩"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(0,4).Text = "最高(终)成绩"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(0,6).Text = "最后得分"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,1).Text = "第一次(表)"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,2).Text = "第二次(表)"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,3).Text = "第三次(表)"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,4).Text = "成绩"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,5).Text = "考生签名"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,6).Text = "单项得分"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,7).Text = "三项总得分"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,8).Text = "登分员签名"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,9).Text = "考务组长签名"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(2,0).Text = "立定跳远(米)"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(3,0).Text = "掷实心球(米)"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(4,0).Text = "一分钟跳绳(次)"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
bg.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
doc.Body.Children.Add(bg) '将表格对象加入到报表中

rt = New prt.RenderText() '创建文本对象
rt.Text = "注:此表为考生原始成绩记录,是输入微机的依据,必须用钢笔填写,不许交考生和无关人员.每项成绩考试后,考生当场签字." '& dr("校名") '设置文本对象的内容
rt.X = 25
rt.Y = 165
rt.Style.TextIndent = 8
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "微机处理后,中招体考成绩入考生升学总分,再将该表装入考生升学档案." '& dr("校名") '设置文本对象的内容
rt.X = 25
rt.Y = 175
rt.Style.TextIndent = 8
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "梁平县中招办盖章" '& dr("校名") '设置文本对象的内容
rt.X = 200
rt.Y = 180
rt.Style.TextIndent = 8
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText '设置文本对象的内容 ' 设置水印
rt.Text = "梁平中招体育考试专用表" '设置文本内容
rt.Width = "Parent.Width" '宽度等于页面宽度
rt.Height = "Parent.Height" '高度等于页面高度
rt.Style.F
rt.Style.FontBold = True '字体加粗
rt.Style.FontSize = 22 '字体大小为8磅
rt.Style.TextAngle = 20 '旋转20度
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中对齐
rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中对齐
rt.Style.TextColor = Color.Gray '文本颜色为灰色
Doc.WaterMark = rt '作为页眉使用

'Next
doc.Preview() '预览


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


加好友 发短信
等级:小狐 帖子:376 积分:4189 威望:0 精华:0 注册:2008/9/1 14:18:00
  发帖心情 Post By:2012/3/15 21:34:00 [只看该作者]

Dim doc As New Printdoc '定义一个报表
doc.PageSetting.PaperKind = 9 '纸张类型改为A4
doc.PageSetting.Landscape = True '横向打印
doc.PageSetting.LeftMargin = 25 '设置左边距
doc.PageSetting.RightMargin = 22 '设置右边距
doc.PageSetting.TopMargin = 25 '设置上边距
doc.PageSetting.BottomMargin = 20 '设置下边距

Dim rt As prt.RenderText '定义一个文本对象
Dim ra As New prt.RenderArea '定义一个容器
ra.SplitVertBehavior = prt.SplitBehaviorEnum.Never  '禁止容器因为分页而被垂直分割

rt = New prt.RenderText() '创建文本对象
rt.Text = "附件3:" '设置文本对象的内容
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 16 '字体大小为16磅
rt.Style.TextAlignHorz = prt.AlignHorzEnum.left
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "梁平县中招体育考试成绩登记表" '设置文本对象的内容
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 20 '字体大小为16磅
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "区  县:梁平县" '设置文本对象的内容
rt.X = 24
rt.Y = 55
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "考  场:" '& dr("姓名") '设置文本对象的内容
rt.X = 120
rt.Y = 55
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "考生照片" '设置文本对象的内容
rt.X = 245
rt.Y = 38
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
rt.Width = 25 '宽度为40毫米
rt.Height = 35 '宽度为40毫米
rt.Style.Borders.All = New prt.Linedef(0.3, Color.Black) '设置边框
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "学  校:" '& dr("校名") '设置文本对象的内容
rt.X = 24
rt.Y = 62
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "准考证号:" '& dr("校名") '设置文本对象的内容
rt.X = 24
rt.Y = 68
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "姓  名:" '& dr("校名") '设置文本对象的内容
rt.X = 120
rt.Y = 68
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "性  别:" '& dr("校名") '设置文本对象的内容
rt.X = 190
rt.Y = 68
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表


rt = New prt.RenderText() '创建文本对象
rt.Text = "注:此表为考生原始成绩记录,是输入微机的依据,必须用钢笔填写,不许交考生和无关人员.每项成绩考试后,考生当场签字." '& dr("校名") '设置文本对象的内容
rt.X = 25
rt.Y = 165
rt.Style.TextIndent = 8
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "微机处理后,中招体考成绩入考生升学总分,再将该表装入考生升学档案." '& dr("校名") '设置文本对象的内容
rt.X = 25
rt.Y = 175
rt.Style.TextIndent = 8
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText() '创建文本对象
rt.Text = "梁平县中招办盖章" '& dr("校名") '设置文本对象的内容
rt.X = 200
rt.Y = 180
rt.Style.TextIndent = 8
rt.Style.F
rt.Style.FontBold = False'字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
doc.Body.Children.Add(rt) '将文本对象加入到报表

rt = New prt.RenderText '设置文本对象的内容 ' 设置水印
rt.Text = "梁平中招体育考试专用表" '设置文本内容
rt.Width = "Parent.Width" '宽度等于页面宽度
rt.Height = "Parent.Height" '高度等于页面高度
rt.Style.F
rt.Style.FontBold = True '字体加粗
rt.Style.FontSize = 22 '字体大小为8磅
rt.Style.TextAngle = 20 '旋转20度
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中对齐
rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中对齐
rt.Style.TextColor = Color.Gray '文本颜色为灰色
Doc.WaterMark = rt '作为页眉使用
ra.Children.Add(rt)

Dim bg As New prt.RenderTable() '定义一个表格对象
bg.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
bg.x = 25
bg.y = 75
bg.Width = 258 '设置表格的宽度为258毫米
bg.Height = 90 '
bg.Rows.Count = 5 '设置行数
bg.Cols.Count = 9 '设置列数
For i As Integer = 0 To 9
    bg.Cols(i).Width = 24
Next
bg.Rows(0).Height = 14 '设置行高
bg.Rows(1).Height = 14 '设置行高
bg.Rows(2).Height = 20 '设置行高
bg.Rows(3).Height = 20 '设置行高
bg.Rows(4).Height = 20 '设置行高

bg.Cells(0,0).SpanRows = 2 '第1行第1个单元格向下合并2行
bg.Cells(0,1).SpanCols = 3 '第1行第2个单元格向右合并3列
bg.Cells(0,4).SpanCols = 2 '第1行第5个单元格向右合并2列
bg.Cells(0,6).SpanCols = 4 '第1行第7个单元格向右合并3列
bg.Cells(2,7).SpanRows = 3 '第2行第8个单元格向下合并3行
bg.Cells(4,1).SpanCols = 3 '第5行第1个单元格向右合并3列
bg.cells(0,0).Text = "项目"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(0,1).Text = "成  绩"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(0,4).Text = "最高(终)成绩"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(0,6).Text = "最后得分"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,1).Text = "第一次(表)"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,2).Text = "第二次(表)"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,3).Text = "第三次(表)"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,4).Text = "成绩"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,5).Text = "考生签名"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,6).Text = "单项得分"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,7).Text = "三项总得分"
rt.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,8).Text = "登分员签名"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(1,9).Text = "考务组长签名"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(2,0).Text = "立定跳远(米)"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(3,0).Text = "掷实心球(米)"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.cells(4,0).Text = "一分钟跳绳(次)"
bg.Style.F
bg.Style.FontBold = False'字体加粗
bg.Style.FontSize = 14 '字体大小为16磅

bg.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
bg.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
ra.Children.Add(bg)
doc.Body.Children.Add(bg) '将表格对象加入到报表中

doc.Preview() '预览

 

上述代码报错


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


加好友 发短信
等级:小狐 帖子:376 积分:4189 威望:0 精华:0 注册:2008/9/1 14:18:00
  发帖心情 Post By:2012/3/15 21:36:00 [只看该作者]

以下内容为程序代码:

1 Dim doc As New Printdoc '定义一个报表
2 doc.PageSetting.PaperKind = 9 '纸张类型改为A4
3 doc.PageSetting.Landscape = True '横向打印
4 doc.PageSetting.LeftMargin = 25 '设置左边距
5 doc.PageSetting.RightMargin = 22 '设置右边距
6 doc.PageSetting.TopMargin = 25 '设置上边距
7 doc.PageSetting.BottomMargin = 20 '设置下边距
8
9 For Each dr As Row In Tables("员工").Rows
10 Dim rt As prt.RenderText '定义一个文本对象
11 Dim ra As New prt.RenderArea '定义一个容器
12 ra.SplitVertBehavior = prt.SplitBehaviorEnum.Never '禁止容器因为分页而被垂直分割
13
14 rt = New prt.RenderText() '创建文本对象
15 rt.Text = "附件3:" '设置文本对象的内容
16 rt.Style.F
17 rt.Style.FontBold = False'字体加粗
18 rt.Style.FontSize = 16 '字体大小为16磅
19 rt.Style.TextAlignHorz = prt.AlignHorzEnum.left
20 doc.Body.Children.Add(rt) '将文本对象加入到报表
21
22 rt = New prt.RenderText() '创建文本对象
23 rt.Text = "梁平县中招体育考试成绩登记表" '设置文本对象的内容
24 rt.Style.F
25 rt.Style.FontBold = False'字体加粗
26 rt.Style.FontSize = 20 '字体大小为16磅
27 rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
28 doc.Body.Children.Add(rt) '将文本对象加入到报表
29
30 rt = New prt.RenderText() '创建文本对象
31 rt.Text = "区 县:梁平县" '设置文本对象的内容
32 rt.X = 24
33 rt.Y = 55
34 rt.Style.F
35 rt.Style.FontBold = False'字体加粗
36 rt.Style.FontSize = 14 '字体大小为16磅
37 doc.Body.Children.Add(rt) '将文本对象加入到报表
38
39 rt = New prt.RenderText() '创建文本对象
40 rt.Text = "考 场:" '& dr("姓名") '设置文本对象的内容
41 rt.X = 120
42 rt.Y = 55
43 rt.Style.F
44 rt.Style.FontBold = False'字体加粗
45 rt.Style.FontSize = 14 '字体大小为16磅
46 doc.Body.Children.Add(rt) '将文本对象加入到报表
47
48 rt = New prt.RenderText() '创建文本对象
49 rt.Text = "考生照片" '设置文本对象的内容
50 rt.X = 245
51 rt.Y = 38
52 rt.Style.F
53 rt.Style.FontBold = False'字体加粗
54 rt.Style.FontSize = 14 '字体大小为16磅
55 rt.Width = 25 '宽度为40毫米
56 rt.Height = 35 '宽度为40毫米
57 rt.Style.Borders.All = New prt.Linedef(0.3, Color.Black) '设置边框
58 rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
59 rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
60 doc.Body.Children.Add(rt) '将文本对象加入到报表
61
62 rt = New prt.RenderText() '创建文本对象
63 rt.Text = "学 校:" '& dr("校名") '设置文本对象的内容
64 rt.X = 24
65 rt.Y = 62
66 rt.Style.F
67 rt.Style.FontBold = False'字体加粗
68 rt.Style.FontSize = 14 '字体大小为16磅
69 doc.Body.Children.Add(rt) '将文本对象加入到报表
70
71 rt = New prt.RenderText() '创建文本对象
72 rt.Text = "准考证号:" '& dr("校名") '设置文本对象的内容
73 rt.X = 24
74 rt.Y = 68
75 rt.Style.F
76 rt.Style.FontBold = False'字体加粗
77 rt.Style.FontSize = 14 '字体大小为16磅
78 doc.Body.Children.Add(rt) '将文本对象加入到报表
79
80 rt = New prt.RenderText() '创建文本对象
81 rt.Text = "姓 名:" '& dr("校名") '设置文本对象的内容
82 rt.X = 120
83 rt.Y = 68
84 rt.Style.F
85 rt.Style.FontBold = False'字体加粗
86 rt.Style.FontSize = 14 '字体大小为16磅
87 doc.Body.Children.Add(rt) '将文本对象加入到报表
88
89 rt = New prt.RenderText() '创建文本对象
90 rt.Text = "性 别:" '& dr("校名") '设置文本对象的内容
91 rt.X = 190
92 rt.Y = 68
93 rt.Style.F
94 rt.Style.FontBold = False'字体加粗
95 rt.Style.FontSize = 14 '字体大小为16磅
96 doc.Body.Children.Add(rt) '将文本对象加入到报表
97
98
99 rt = New prt.RenderText() '创建文本对象
100 rt.Text = "注:此表为考生原始成绩记录,是输入微机的依据,必须用钢笔填写,不许交考生和无关人员.每项成绩考试后,考生当场签字." '& dr("校名") '设置文本对象的内容
101 rt.X = 25
102 rt.Y = 165
103 rt.Style.TextIndent = 8
104 rt.Style.F
105 rt.Style.FontBold = False'字体加粗
106 rt.Style.FontSize = 14 '字体大小为16磅
107 doc.Body.Children.Add(rt) '将文本对象加入到报表
108
109 rt = New prt.RenderText() '创建文本对象
110 rt.Text = "微机处理后,中招体考成绩入考生升学总分,再将该表装入考生升学档案." '& dr("校名") '设置文本对象的内容
111 rt.X = 25
112 rt.Y = 175
113 rt.Style.TextIndent = 8
114 rt.Style.F
115 rt.Style.FontBold = False'字体加粗
116 rt.Style.FontSize = 14 '字体大小为16磅
117 doc.Body.Children.Add(rt) '将文本对象加入到报表
118
119 rt = New prt.RenderText() '创建文本对象
120 rt.Text = "梁平县中招办盖章" '& dr("校名") '设置文本对象的内容
121 rt.X = 200
122 rt.Y = 180
123 rt.Style.TextIndent = 8
124 rt.Style.F
125 rt.Style.FontBold = False'字体加粗
126 rt.Style.FontSize = 14 '字体大小为16磅
127 doc.Body.Children.Add(rt) '将文本对象加入到报表
128
129 rt = New prt.RenderText '设置文本对象的内容 ' 设置水印
130 rt.Text = "梁平中招体育考试专用表" '设置文本内容
131 rt.Width = "Parent.Width" '宽度等于页面宽度
132 rt.Height = "Parent.Height" '高度等于页面高度
133 rt.Style.F
134 rt.Style.FontBold = True '字体加粗
135 rt.Style.FontSize = 22 '字体大小为8磅
136 rt.Style.TextAngle = 20 '旋转20度
137 rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中对齐
138 rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中对齐
139 rt.Style.TextColor = Color.Gray '文本颜色为灰色
140 Doc.WaterMark = rt '作为页眉使用
141 ra.Children.Add(rt)
142
143 Dim bg As New prt.RenderTable() '定义一个表格对象
144 bg.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
145 bg.x = 25
146 bg.y = 75
147 bg.Width = 258 '设置表格的宽度为258毫米
148 bg.Height = 90 '
149 bg.Rows.Count = 5 '设置行数
150 bg.Cols.Count = 9 '设置列数
151 For i As Integer = 0 To 9
152 bg.Cols(i).Width = 24
153 Next
154 bg.Rows(0).Height = 14 '设置行高
155 bg.Rows(1).Height = 14 '设置行高
156 bg.Rows(2).Height = 20 '设置行高
157 bg.Rows(3).Height = 20 '设置行高
158 bg.Rows(4).Height = 20 '设置行高
159
160 bg.Cells(0,0).SpanRows = 2 '第1行第1个单元格向下合并2行
161 bg.Cells(0,1).SpanCols = 3 '第1行第2个单元格向右合并3列
162 bg.Cells(0,4).SpanCols = 2 '第1行第5个单元格向右合并2列
163 bg.Cells(0,6).SpanCols = 4 '第1行第7个单元格向右合并3列
164 bg.Cells(2,7).SpanRows = 3 '第2行第8个单元格向下合并3行
165 bg.Cells(4,1).SpanCols = 3 '第5行第1个单元格向右合并3列
166 bg.cells(0,0).Text = "项目"
167 bg.Style.F
168 bg.Style.FontBold = False'字体加粗
169 bg.Style.FontSize = 14 '字体大小为16磅
170
171 bg.cells(0,1).Text = "成 绩"
172 bg.Style.F
173 bg.Style.FontBold = False'字体加粗
174 bg.Style.FontSize = 14 '字体大小为16磅
175
176 bg.cells(0,4).Text = "最高(终)成绩"
177 bg.Style.F
178 bg.Style.FontBold = False'字体加粗
179 bg.Style.FontSize = 14 '字体大小为16磅
180
181 bg.cells(0,6).Text = "最后得分"
182 bg.Style.F
183 bg.Style.FontBold = False'字体加粗
184 bg.Style.FontSize = 14 '字体大小为16磅
185
186 bg.cells(1,1).Text = "第一次(表)"
187 bg.Style.F
188 bg.Style.FontBold = False'字体加粗
189 bg.Style.FontSize = 14 '字体大小为16磅
190
191 bg.cells(1,2).Text = "第二次(表)"
192 rt.Style.F
193 bg.Style.FontBold = False'字体加粗
194 bg.Style.FontSize = 14 '字体大小为16磅
195
196 bg.cells(1,3).Text = "第三次(表)"
197 bg.Style.F
198 bg.Style.FontBold = False'字体加粗
199 bg.Style.FontSize = 14 '字体大小为16磅
200
201 bg.cells(1,4).Text = "成绩"
202 bg.Style.F
203 bg.Style.FontBold = False'字体加粗
204 bg.Style.FontSize = 14 '字体大小为16磅
205
206 bg.cells(1,5).Text = "考生签名"
207 rt.Style.F
208 bg.Style.FontBold = False'字体加粗
209 bg.Style.FontSize = 14 '字体大小为16磅
210
211 bg.cells(1,6).Text = "单项得分"
212 bg.Style.F
213 bg.Style.FontBold = False'字体加粗
214 bg.Style.FontSize = 14 '字体大小为16磅
215
216 bg.cells(1,7).Text = "三项总得分"
217 rt.Style.F
218 bg.Style.FontBold = False'字体加粗
219 bg.Style.FontSize = 14 '字体大小为16磅
220
221 bg.cells(1,8).Text = "登分员签名"
222 bg.Style.F
223 bg.Style.FontBold = False'字体加粗
224 bg.Style.FontSize = 14 '字体大小为16磅
225
226 bg.cells(1,9).Text = "考务组长签名"
227 bg.Style.F
228 bg.Style.FontBold = False'字体加粗
229 bg.Style.FontSize = 14 '字体大小为16磅
230
231 bg.cells(2,0).Text = "立定跳远(米)"
232 bg.Style.F
233 bg.Style.FontBold = False'字体加粗
234 bg.Style.FontSize = 14 '字体大小为16磅
235
236 bg.cells(3,0).Text = "掷实心球(米)"
237 bg.Style.F
238 bg.Style.FontBold = False'字体加粗
239 bg.Style.FontSize = 14 '字体大小为16磅
240
241 bg.cells(4,0).Text = "一分钟跳绳(次)"
242 bg.Style.F
243 bg.Style.FontBold = False'字体加粗
244 bg.Style.FontSize = 14 '字体大小为16磅
245
246 bg.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
247 bg.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
248 ra.Children.Add(bg)
249 doc.Body.Children.Add(bg) '将表格对象加入到报表中
250 Next
251
252 doc.Preview() '预览


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


加好友 发短信
等级:小狐 帖子:376 积分:4189 威望:0 精华:0 注册:2008/9/1 14:18:00
  发帖心情 Post By:2012/3/15 21:59:00 [只看该作者]

已解决
以下内容为程序代码:

1 Dim doc As New Printdoc '定义一个报表
2 doc.PageSetting.PaperKind = 9 '纸张类型改为A4
3 doc.PageSetting.Landscape = True '横向打印
4 doc.PageSetting.LeftMargin = 25 '设置左边距
5 doc.PageSetting.RightMargin = 22 '设置右边距
6 doc.PageSetting.TopMargin = 25 '设置上边距
7 doc.PageSetting.BottomMargin = 20 '设置下边距
8 For Each dr As Row In Tables("员工").Rows
9 Dim rt As prt.RenderText '定义一个文本对象
10 Dim ra As New prt.RenderArea '定义一个容器
11 ra.SplitVertBehavior = prt.SplitBehaviorEnum.Never '禁止容器因为分页而被垂直分割
12
13 rt = New prt.RenderText() '创建文本对象
14 rt.Text = "附件3:" '设置文本对象的内容
15 rt.Style.F
16 rt.Style.FontBold = False'字体加粗
17 rt.Style.FontSize = 16 '字体大小为16磅
18 rt.Style.TextAlignHorz = prt.AlignHorzEnum.left
19 ra.Children.Add(rt) '加入到容器中
20
21 rt = New prt.RenderText() '创建文本对象
22 rt.Text = "梁平县中招体育考试成绩登记表" '设置文本对象的内容
23 rt.Style.F
24 rt.Style.FontBold = False'字体加粗
25 rt.Style.FontSize = 20 '字体大小为16磅
26 rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
27 ra.Children.Add(rt) '加入到容器中
28
29 rt = New prt.RenderText() '创建文本对象
30 rt.Text = "区 县:梁平县" '设置文本对象的内容
31 rt.X = 24
32 rt.Y = 55
33 rt.Style.F
34 rt.Style.FontBold = False'字体加粗
35 rt.Style.FontSize = 14 '字体大小为16磅
36 ra.Children.Add(rt) '加入到容器中
37
38 rt = New prt.RenderText() '创建文本对象
39 rt.Text = "考 场:" & dr("姓名") '设置文本对象的内容
40 rt.X = 120
41 rt.Y = 55
42 rt.Style.F
43 rt.Style.FontBold = False'字体加粗
44 rt.Style.FontSize = 14 '字体大小为16磅
45 ra.Children.Add(rt) '加入到容器中
46
47 rt = New prt.RenderText() '创建文本对象
48 rt.Text = "考生照片" '设置文本对象的内容
49 rt.X = 245
50 rt.Y = 38
51 rt.Style.F
52 rt.Style.FontBold = False'字体加粗
53 rt.Style.FontSize = 14 '字体大小为16磅
54 rt.Width = 25 '宽度为40毫米
55 rt.Height = 35 '宽度为40毫米
56 rt.Style.Borders.All = New prt.Linedef(0.3, Color.Black) '设置边框
57 rt.SplitHorzBehavior = prt.SplitBehaviorEnum.Never
58 'rt.SplitVertBehavior = prt.SplitBehaviorEnum.Never
59
60 rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
61 rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
62 ra.Children.Add(rt) '加入到容器中
63
64 rt = New prt.RenderText() '创建文本对象
65 rt.Text = "学 校:" '& dr("校名") '设置文本对象的内容
66 rt.X = 24
67 rt.Y = 62
68 rt.Style.F
69 rt.Style.FontBold = False'字体加粗
70 rt.Style.FontSize = 14 '字体大小为16磅
71 ra.Children.Add(rt) '加入到容器中
72
73 rt = New prt.RenderText() '创建文本对象
74 rt.Text = "准考证号:" '& dr("校名") '设置文本对象的内容
75 rt.X = 24
76 rt.Y = 68
77 rt.Style.F
78 rt.Style.FontBold = False'字体加粗
79 rt.Style.FontSize = 14 '字体大小为16磅
80 ra.Children.Add(rt) '加入到容器中
81
82 rt = New prt.RenderText() '创建文本对象
83 rt.Text = "姓 名:" '& dr("校名") '设置文本对象的内容
84 rt.X = 120
85 rt.Y = 68
86 rt.Style.F
87 rt.Style.FontBold = False'字体加粗
88 rt.Style.FontSize = 14 '字体大小为16磅
89 ra.Children.Add(rt) '加入到容器中
90
91 rt = New prt.RenderText() '创建文本对象
92 rt.Text = "性 别:" '& dr("校名") '设置文本对象的内容
93 rt.X = 190
94 rt.Y = 68
95 rt.Style.F
96 rt.Style.FontBold = False'字体加粗
97 rt.Style.FontSize = 14 '字体大小为16磅
98 ra.Children.Add(rt) '加入到容器中
99
100 rt = New prt.RenderText() '创建文本对象
101 rt.Text = "注:此表为考生原始成绩记录,是输入微机的依据,必须用钢笔填写,不许交考生和无关人员.每项成绩考试后,考生当场签字." '& dr("校名") '设置文本对象的内容
102 rt.X = 25
103 rt.Y = 165
104 rt.Style.TextIndent = 8
105 rt.Style.F
106 rt.Style.FontBold = False'字体加粗
107 rt.Style.FontSize = 14 '字体大小为16磅
108 ra.Children.Add(rt) '加入到容器中
109
110 rt = New prt.RenderText() '创建文本对象
111 rt.Text = "微机处理后,中招体考成绩入考生升学总分,再将该表装入考生升学档案." '& dr("校名") '设置文本对象的内容
112 rt.X = 25
113 rt.Y = 175
114 rt.Style.TextIndent = 8
115 rt.Style.F
116 rt.Style.FontBold = False'字体加粗
117 rt.Style.FontSize = 14 '字体大小为16磅
118 ra.Children.Add(rt) '加入到容器中
119
120 rt = New prt.RenderText() '创建文本对象
121 rt.Text = "梁平县中招办盖章" '& dr("校名") '设置文本对象的内容
122 rt.X = 200
123 rt.Y = 180
124 rt.Style.TextIndent = 8
125 rt.Style.F
126 rt.Style.FontBold = False'字体加粗
127 rt.Style.FontSize = 14 '字体大小为16磅
128 ra.Children.Add(rt) '加入到容器中
129
130 rt = New prt.RenderText '设置文本对象的内容 ' 设置水印
131 rt.Text = "梁平中招体育考试专用表" '设置文本内容
132 rt.Width = "Parent.Width" '宽度等于页面宽度
133 rt.Height = "Parent.Height" '高度等于页面高度
134 rt.Style.F
135 rt.Style.FontBold = True '字体加粗
136 rt.Style.FontSize = 22 '字体大小为8磅
137 rt.Style.TextAngle = 20 '旋转20度
138 rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中对齐
139 rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中对齐
140 rt.Style.TextColor = Color.Gray '文本颜色为灰色
141 ra.Children.Add(rt)
142
143
144
145
146 Dim bg As New prt.RenderTable() '定义一个表格对象
147 bg.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
148 bg.x = 25
149 bg.y = 75
150 bg.Width = 258 '设置表格的宽度为258毫米
151 bg.Height = 90 '
152 bg.Rows.Count = 5 '设置行数
153 bg.Cols.Count = 9 '设置列数
154 For i As Integer = 0 To 9
155 bg.Cols(i).Width = 24
156 Next
157 bg.Rows(0).Height = 14 '设置行高
158 bg.Rows(1).Height = 14 '设置行高
159 bg.Rows(2).Height = 20 '设置行高
160 bg.Rows(3).Height = 20 '设置行高
161 bg.Rows(4).Height = 20 '设置行高
162
163 bg.Cells(0,0).SpanRows = 2 '第1行第1个单元格向下合并2行
164 bg.Cells(0,1).SpanCols = 3 '第1行第2个单元格向右合并3列
165 bg.Cells(0,4).SpanCols = 2 '第1行第5个单元格向右合并2列
166 bg.Cells(0,6).SpanCols = 4 '第1行第7个单元格向右合并3列
167 bg.Cells(2,7).SpanRows = 3 '第2行第8个单元格向下合并3行
168 bg.Cells(4,1).SpanCols = 3 '第5行第1个单元格向右合并3列
169 bg.cells(0,0).Text = "项目"
170 bg.Style.F
171 bg.Style.FontBold = False'字体加粗
172 bg.Style.FontSize = 14 '字体大小为16磅
173
174 bg.cells(0,1).Text = "成 绩"
175 bg.Style.F
176 bg.Style.FontBold = False'字体加粗
177 bg.Style.FontSize = 14 '字体大小为16磅
178
179 bg.cells(0,4).Text = "最高(终)成绩"
180 bg.Style.F
181 bg.Style.FontBold = False'字体加粗
182 bg.Style.FontSize = 14 '字体大小为16磅
183
184 bg.cells(0,6).Text = "最后得分"
185 bg.Style.F
186 bg.Style.FontBold = False'字体加粗
187 bg.Style.FontSize = 14 '字体大小为16磅
188
189 bg.cells(1,1).Text = "第一次(表)"
190 bg.Style.F
191 bg.Style.FontBold = False'字体加粗
192 bg.Style.FontSize = 14 '字体大小为16磅
193
194 bg.cells(1,2).Text = "第二次(表)"
195 rt.Style.F
196 bg.Style.FontBold = False'字体加粗
197 bg.Style.FontSize = 14 '字体大小为16磅
198
199 bg.cells(1,3).Text = "第三次(表)"
200 bg.Style.F
201 bg.Style.FontBold = False'字体加粗
202 bg.Style.FontSize = 14 '字体大小为16磅
203
204 bg.cells(1,4).Text = "成绩"
205 bg.Style.F
206 bg.Style.FontBold = False'字体加粗
207 bg.Style.FontSize = 14 '字体大小为16磅
208
209 bg.cells(1,5).Text = "考生签名"
210 rt.Style.F
211 bg.Style.FontBold = False'字体加粗
212 bg.Style.FontSize = 14 '字体大小为16磅
213
214 bg.cells(1,6).Text = "单项得分"
215 bg.Style.F
216 bg.Style.FontBold = False'字体加粗
217 bg.Style.FontSize = 14 '字体大小为16磅
218
219 bg.cells(1,7).Text = "三项总得分"
220 rt.Style.F
221 bg.Style.FontBold = False'字体加粗
222 bg.Style.FontSize = 14 '字体大小为16磅
223
224 bg.cells(1,8).Text = "登分员签名"
225 bg.Style.F
226 bg.Style.FontBold = False'字体加粗
227 bg.Style.FontSize = 14 '字体大小为16磅
228
229 bg.cells(1,9).Text = "考务组长签名"
230 bg.Style.F
231 bg.Style.FontBold = False'字体加粗
232 bg.Style.FontSize = 14 '字体大小为16磅
233
234 bg.cells(2,0).Text = "立定跳远(米)"
235 bg.Style.F
236 bg.Style.FontBold = False'字体加粗
237 bg.Style.FontSize = 14 '字体大小为16磅
238
239 bg.cells(3,0).Text = "掷实心球(米)"
240 bg.Style.F
241 bg.Style.FontBold = False'字体加粗
242 bg.Style.FontSize = 14 '字体大小为16磅
243
244 bg.cells(4,0).Text = "一分钟跳绳(次)"
245 bg.Style.F
246 bg.Style.FontBold = False'字体加粗
247 bg.Style.FontSize = 14 '字体大小为16磅
248
249 bg.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
250 bg.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
251 ra.Children.Add(bg)
252 Doc.Body.ChildRen.Add(ra) '将容器加入到报表中
253
254 Next
255
256 doc.Preview() '预览

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


加好友 发短信
等级:小狐 帖子:376 积分:4189 威望:0 精华:0 注册:2008/9/1 14:18:00
  发帖心情 Post By:2012/3/15 22:00:00 [只看该作者]

Dim doc As New Printdoc '定义一个报表
doc.PageSetting.PaperKind = 9 '纸张类型改为A4
doc.PageSetting.Landscape = True '横向打印
doc.PageSetting.LeftMargin = 25 '设置左边距
doc.PageSetting.RightMargin = 22 '设置右边距
doc.PageSetting.TopMargin = 25 '设置上边距
doc.PageSetting.BottomMargin = 20 '设置下边距
For Each dr As Row In Tables("员工").Rows
    Dim rt As prt.RenderText '定义一个文本对象
    Dim ra As New prt.RenderArea '定义一个容器
    ra.SplitVertBehavior = prt.SplitBehaviorEnum.Never  '禁止容器因为分页而被垂直分割
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "附件3:" '设置文本对象的内容
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 16 '字体大小为16磅
    rt.Style.TextAlignHorz = prt.AlignHorzEnum.left
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "梁平县中招体育考试成绩登记表" '设置文本对象的内容
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 20 '字体大小为16磅
    rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "区  县:梁平县" '设置文本对象的内容
    rt.X = 24
    rt.Y = 55
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "考  场:" & dr("姓名") '设置文本对象的内容
    rt.X = 120
    rt.Y = 55
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "考生照片" '设置文本对象的内容
    rt.X = 245
    rt.Y = 38
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    rt.Width = 25 '宽度为40毫米
    rt.Height = 35 '宽度为40毫米
    rt.Style.Borders.All = New prt.Linedef(0.3, Color.Black) '设置边框
    rt.SplitHorzBehavior = prt.SplitBehaviorEnum.Never
    'rt.SplitVertBehavior = prt.SplitBehaviorEnum.Never
   
    rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
    rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "学  校:" '& dr("校名") '设置文本对象的内容
    rt.X = 24
    rt.Y = 62
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "准考证号:" '& dr("校名") '设置文本对象的内容
    rt.X = 24
    rt.Y = 68
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "姓  名:" '& dr("校名") '设置文本对象的内容
    rt.X = 120
    rt.Y = 68
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "性  别:" '& dr("校名") '设置文本对象的内容
    rt.X = 190
    rt.Y = 68
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "注:此表为考生原始成绩记录,是输入微机的依据,必须用钢笔填写,不许交考生和无关人员.每项成绩考试后,考生当场签字." '& dr("校名") '设置文本对象的内容
    rt.X = 25
    rt.Y = 165
    rt.Style.TextIndent = 8
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "微机处理后,中招体考成绩入考生升学总分,再将该表装入考生升学档案." '& dr("校名") '设置文本对象的内容
    rt.X = 25
    rt.Y = 175
    rt.Style.TextIndent = 8
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "梁平县中招办盖章" '& dr("校名") '设置文本对象的内容
    rt.X = 200
    rt.Y = 180
    rt.Style.TextIndent = 8
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText '设置文本对象的内容 ' 设置水印
    rt.Text = "梁平中招体育考试专用表" '设置文本内容
    rt.Width = "Parent.Width" '宽度等于页面宽度
    rt.Height = "Parent.Height" '高度等于页面高度
    rt.Style.F
    rt.Style.FontBold = True '字体加粗
    rt.Style.FontSize = 22 '字体大小为8磅
    rt.Style.TextAngle = 20 '旋转20度
    rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中对齐
    rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中对齐
    rt.Style.TextColor = Color.Gray '文本颜色为灰色
    ra.Children.Add(rt)
   
   
   
   
    Dim bg As New prt.RenderTable() '定义一个表格对象
    bg.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    bg.x = 25
    bg.y = 75
    bg.Width = 258 '设置表格的宽度为258毫米
    bg.Height = 90 '
    bg.Rows.Count = 5 '设置行数
    bg.Cols.Count = 9 '设置列数
    For i As Integer = 0 To 9
        bg.Cols(i).Width = 24
    Next
    bg.Rows(0).Height = 14 '设置行高
    bg.Rows(1).Height = 14 '设置行高
    bg.Rows(2).Height = 20 '设置行高
    bg.Rows(3).Height = 20 '设置行高
    bg.Rows(4).Height = 20 '设置行高
   
    bg.Cells(0,0).SpanRows = 2 '第1行第1个单元格向下合并2行
    bg.Cells(0,1).SpanCols = 3 '第1行第2个单元格向右合并3列
    bg.Cells(0,4).SpanCols = 2 '第1行第5个单元格向右合并2列
    bg.Cells(0,6).SpanCols = 4 '第1行第7个单元格向右合并3列
    bg.Cells(2,7).SpanRows = 3 '第2行第8个单元格向下合并3行
    bg.Cells(4,1).SpanCols = 3 '第5行第1个单元格向右合并3列
    bg.cells(0,0).Text = "项目"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(0,1).Text = "成  绩"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(0,4).Text = "最高(终)成绩"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(0,6).Text = "最后得分"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,1).Text = "第一次(表)"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,2).Text = "第二次(表)"
    rt.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,3).Text = "第三次(表)"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,4).Text = "成绩"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,5).Text = "考生签名"
    rt.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,6).Text = "单项得分"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,7).Text = "三项总得分"
    rt.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,8).Text = "登分员签名"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,9).Text = "考务组长签名"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(2,0).Text = "立定跳远(米)"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(3,0).Text = "掷实心球(米)"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(4,0).Text = "一分钟跳绳(次)"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
    bg.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
    ra.Children.Add(bg)
    Doc.Body.ChildRen.Add(ra) '将容器加入到报表中
   
Next

doc.Preview() '预览


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


加好友 发短信
等级:小狐 帖子:376 积分:4189 威望:0 精华:0 注册:2008/9/1 14:18:00
  发帖心情 Post By:2012/3/15 22:08:00 [只看该作者]

Dim doc As New Printdoc '定义一个报表
doc.PageSetting.PaperKind = 9 '纸张类型改为A4
doc.PageSetting.Landscape = True '横向打印
doc.PageSetting.LeftMargin = 25 '设置左边距
doc.PageSetting.RightMargin = 20 '设置右边距
doc.PageSetting.TopMargin = 25 '设置上边距
doc.PageSetting.BottomMargin = 20 '设置下边距
For Each dr As Row In Tables("员工").Rows
    Dim rt As prt.RenderText '定义一个文本对象
    Dim ra As New prt.RenderArea '定义一个容器
    ra.SplitVertBehavior = prt.SplitBehaviorEnum.Never  '禁止容器因为分页而被垂直分割
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "附件3:" '设置文本对象的内容
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 16 '字体大小为16磅
    rt.Style.TextAlignHorz = prt.AlignHorzEnum.left
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "梁平县中招体育考试成绩登记表" '设置文本对象的内容
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 20 '字体大小为16磅
    rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "区  县:梁平县" '设置文本对象的内容
    rt.X = 1
    rt.Y = 30
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "考  场:" & dr("姓名") '设置文本对象的内容
    rt.X = 100
    rt.Y = 30
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "考生照片" '设置文本对象的内容
    rt.X = 220
    rt.Y = 15
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    rt.Width = 25 '宽度为40毫米
    rt.Height = 35 '宽度为40毫米
    rt.Style.Borders.All = New prt.Linedef(0.3, Color.Black) '设置边框
    rt.SplitHorzBehavior = prt.SplitBehaviorEnum.Never
    rt.SplitVertBehavior = prt.SplitBehaviorEnum.Never
   
    rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
    rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "学  校:" & dr("姓名") '设置文本对象的内容
    rt.X = 1
    rt.Y = 37
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "准考证号:" '& dr("校名") '设置文本对象的内容
    rt.X = 1
    rt.Y = 44
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "姓  名:" '& dr("校名") '设置文本对象的内容
    rt.X = 100
    rt.Y = 44
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "性  别:" '& dr("校名") '设置文本对象的内容
    rt.X = 160
    rt.Y = 44
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "注:此表为考生原始成绩记录,是输入微机的依据,必须用钢笔填写,不许交考生和无关人员.每项成绩考试后,考生当场签字." '& dr("校名") '设置文本对象的内容
    rt.X = 1
    rt.Y = 145
    rt.Style.TextIndent = 8
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "微机处理后,中招体考成绩入考生升学总分,再将该表装入考生升学档案." '& dr("校名") '设置文本对象的内容
    rt.X = 1
    rt.Y = 155
    rt.Style.TextIndent = 8
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText() '创建文本对象
    rt.Text = "梁平县中招办盖章" '& dr("校名") '设置文本对象的内容
    rt.X = 170
    rt.Y = 160
    rt.Style.TextIndent = 8
    rt.Style.F
    rt.Style.FontBold = False'字体加粗
    rt.Style.FontSize = 14 '字体大小为16磅
    ra.Children.Add(rt) '加入到容器中
   
    rt = New prt.RenderText '设置文本对象的内容 ' 设置水印
    rt.Text = "梁平中招体育考试专用表" '设置文本内容
    rt.Width = "Parent.Width" '宽度等于页面宽度
    rt.Height = "Parent.Height" '高度等于页面高度
    rt.Style.F
    rt.Style.FontBold = True '字体加粗
    rt.Style.FontSize = 22 '字体大小为8磅
    rt.Style.TextAngle = 20 '旋转20度
    rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中对齐
    rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中对齐
    rt.Style.TextColor = Color.Gray '文本颜色为灰色
    ra.Children.Add(rt)
   
    Dim bg As New prt.RenderTable() '定义一个表格对象
    bg.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
    bg.x = 1
    bg.y = 53
    bg.Width = 250 '设置表格的宽度为258毫米
    bg.Height = 90 '
    bg.Rows.Count = 5 '设置行数
    bg.Cols.Count = 9 '设置列数
    For i As Integer = 0 To 9
        bg.Cols(i).Width = 24
    Next
    bg.Rows(0).Height = 14 '设置行高
    bg.Rows(1).Height = 14 '设置行高
    bg.Rows(2).Height = 20 '设置行高
    bg.Rows(3).Height = 20 '设置行高
    bg.Rows(4).Height = 20 '设置行高
   
    bg.Cells(0,0).SpanRows = 2 '第1行第1个单元格向下合并2行
    bg.Cells(0,1).SpanCols = 3 '第1行第2个单元格向右合并3列
    bg.Cells(0,4).SpanCols = 2 '第1行第5个单元格向右合并2列
    bg.Cells(0,6).SpanCols = 4 '第1行第7个单元格向右合并3列
    bg.Cells(2,7).SpanRows = 3 '第2行第8个单元格向下合并3行
    bg.Cells(4,1).SpanCols = 3 '第5行第1个单元格向右合并3列
    bg.cells(0,0).Text = "项目"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(0,1).Text = "成  绩"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(0,4).Text = "最高(终)成绩"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(0,6).Text = "最后得分"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,1).Text = "第一次(表)"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,2).Text = "第二次(表)"
    rt.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,3).Text = "第三次(表)"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,4).Text = "成绩"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,5).Text = "考生签名"
    rt.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,6).Text = "单项得分"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,7).Text = "三项总得分"
    rt.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,8).Text = "登分员签名"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(1,9).Text = "考务组长签名"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(2,0).Text = "立定跳远(米)"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(3,0).Text = "掷实心球(米)"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.cells(4,0).Text = "一分钟跳绳(次)"
    bg.Style.F
    bg.Style.FontBold = False'字体加粗
    bg.Style.FontSize = 14 '字体大小为16磅
   
    bg.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
    bg.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
    ra.Children.Add(bg)
    Doc.Body.ChildRen.Add(ra) '将容器加入到报表中
   
Next

doc.Preview() '预览


 回到顶部
美女呀,离线,留言给我吧!
view360
  9楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:49 积分:499 威望:0 精华:0 注册:2012/2/28 18:11:00
  发帖心情 Post By:2012/3/15 22:10:00 [只看该作者]

你好长啊,看的我头晕。。。哈哈图片点击可在新窗口打开查看

 回到顶部