Dim doc As New PrintDoc '定义一个报表
doc.PageSetting.Width = 50 '纸张宽度为50毫米
doc.PageSetting.Height = 30 '纸张高度为30毫米
Dim rx As prt.RenderText '定义一个文本对象
Dim rm As prt.RenderImage '定义一个图形队形
Dim Currow As Row
Dim tbl As Table = Tables("表A")
For i As Integer = tbl.TopRow To tbl.BottomRow
CurRow = tbl.rows(i)
Dim rep As New prt.RenderEmpty '定义一个新的空对象
rep.BreakBefore = prt.BreakEnum.Page '打印前换页
doc.Body.Children.Add(rep ) '加入到报表中
rx = new prt.RenderText
rx.Text = CurRow("序号")
'rx.Style.FontSize = 8 '大体大小为16磅
rx.x = 15
rx.y = 6
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = CurRow("编号")
'rx.Style.FontSize = 8 '大体大小为16磅
rx.x = 15
rx.y = 18
doc.body.Children.Add(rx)
Next
Doc.Preview() '预览报表
以上代码,设置了纸张的规格:50*30mm,打印的数据内容却会自动换行,这是为什么?