Dim nd As String = e.Form.Controls("ComboBox1").Text
Dim sd As String = e.Form.Controls("ComboBox2").Text
Dim Doc As New PrintDoc
Dim rm As new prt.RenderImage
Dim rt As prt.RenderText
Dim ry As prt.RenderText
For Each r As DataRow In DataTables("退休认证资料").Select("认证年度 = '" & nd & "' or 认证时段 = '" & sd & "'")
rm = new prt.RenderImage
rm.Width = "100%Parent"
rm.Height = "100%Parent"
rm.image = getimage(ProjectPath & "attachments/" & r("认证资料"))
rm.Style.ImageAlign.AlignHorz = prt.ImageAlignHorzEnum.Center
rm.Style.Borders.All = new prt.LineDef(0.3,Color.red)
rm.Style.Spacing.Bottom = 8
Doc.Body.Children.Add(rm)
Next
rt = new prt.RenderText
r = Tables("退休认证资料").Current
rt.text = "涟源市杨市镇中心卫生院退休职工生存认证照片资料__" & r("姓名")
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
rt.Style.Fontsize = 16
Doc.PageHeader = rt
ry = new prt.RenderText
ry.text = "第[pageno]页,共[pagecount]页"
ry.Style.TextAlignHorz = prt.AlignHorzEnum.Center
ry.Style.Fontsize = 16
Doc.PageFooter = ry
Doc.Preview()