Dim doc As New PrintDoc '定义一个报表
Dim rx As New prt.RenderText '定义一个文本对象
doc.Body.Children.Add(rx) '将文本对象加入到报表
Dim CurRow As Row = Tables("表B").Current
doc.PageSetting.PaperKind = 13 '设为B5纸张
rx.Width = "Parent.Width" '对象宽度等于页面宽度
rx.Height = "Parent.Height" '对象高度等于页面高度
rx.Style.LineSpacing =100
rx = new prt.RenderText
rx.Text = CurRow("姓名")
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 60
rx.y = 23
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = CurRow("性别")
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 60
rx.y = 35
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = Format(CurRow("出生日期"), "yyyy年MM月dd日")
'rx.DataBinding.DataSource = BindTables("表B") '将rx绑定表B
'rx.Text= "[Format(Fields!出生日期.Value,""yyyy 年 MM 月 dd 日 "")]"
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 60
rx.y = 45
doc.body.Children.Add(rx)
Doc.Preview() '预览报表