Dim rxt As New prt.RenderText '定义一个文本对象
Dim rx11 As New prt.RenderText '定义一个文本对象
Dim pj4 As Table = Tables("学生查询四")
Dim pj0 As Table = Tables("学生查询")
Dim pj1 As Table = Tables("学生查询一")
Dim tpp As Table = Tables("考试科目")
rxt.text = "分数分析:"
rxt.Style.FontBold = True '字体加粗
rxt.Style.FontSize = 11 '大体大小为16磅
rxt.Style.TextAlignHorz = prt.AlignHorzEnum.left '水平居中排列
rxt.Style.Spacing.top = 15 '和下面的对象(表格)距离3毫米
rxt.Style.Spacing.Bottom = 2 '和下面的对象(表格)距离3毫米
rx11.Style.LineSpacing = 180 '设置1.5倍行距
rx11.Style.FontSize = 10 '大体大小为16磅
rx11.Style.TextAlignHorz = prt.AlignHorzEnum.left '水平居中排列
rx11.Style.Spacing.top = 2 '和下面的对象(表格)距离3毫米
rx11.Style.Spacing.Bottom = 6 '和下面的对象(表格)距离3毫米
Dim zf0 As Double = pj0.Compute("sum(总分)")
Dim zf4 As Double = pj4.Compute("avg(总分)")
Dim zf As Double = Format(zf0 - zf4,"0.0")
Dim zfpm0 As Double = pj0.Compute("sum(总分排名)")
Dim zfpm1 As Double = pj1.Compute("sum(总分排名)")
Dim zfpm As Double = Format(zfpm1 - zfpm0,"0")
rx11.text = " 此次考试您的孩子成绩总分为"& CurRow1("总分") & "分,总分名次为" & CurRow1("总分排名") & "名.与全班相比,"
For i As Integer = 0 To tpp.Rows.Count -1
Dim yw0 As Double = pj0.Compute("sum(" & tpp.Rows(i)("学科") & ")")
Dim yw4 As Double = pj4.Compute("avg(" & tpp.Rows(i)("学科") & ")")
Dim yw As Double = Format(yw0 - yw4,"0.0")
Dim yw3 As String = iif(yw0 = 0 Or yw4 = 0,"",tpp.Rows(i)("学科") & "学科超均分" & yw & "分,")
rx11.text = rx11.text & yw3 & "总分超均分" & zf & "分."
Next
rx11.text = rx11.text & "与上期考试相比,总分名次进步" & zfpm & "名,希望您在繁忙的工作之余,对孩子多加鼓励,鞭策前行,我们期待孩子在未来取得更大的进步!"
doc.Body.Children.Add(rxt) '加入到报表中
doc.Body.Children.Add(rx11) '加入到报表中