以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 报表的问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=77306) |
-- 作者:农村人 -- 发布时间:2015/11/16 9:59:00 -- 报表的问题 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,打印的数据内容却会自动换行,这是为什么?
|
-- 作者:大红袍 -- 发布时间:2015/11/16 10:03:00 -- 加一句
rx.Width = "Auto" \'自动设置宽度 |