Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:专业报表 打印文字在出现空格,跳到下一行

1楼
tungwun 发表于:2011/7/12 23:20:00

Dim doc As New PrintDoc '定义一个报表
Dim rt As  prt.RenderText '定义一个文本对象
Dim CurRow As Row = Tables("TAXI車輛資料").Current
rx = new prt.RenderText
rx.Text = CurRow("修理內容")
rx.x = 26.5
rx.y = 76
rx.Width= 163
doc.body.Children.Add(rx)
文字在出现空格,跳到下一行怎样用在上面("修理内容") ?
Dim s As String ="修理冷气 换日本翻新冻cail一个 方哇呶 抽真空入环保雪种 入134a泵油"
For Each s1 As String In s.split(" ")
    rt =New prt.RenderText
    rt.Text = s1 '设置文本对象的内容
    doc.Body.Children.Add(rt) '将文本对象加入到报表
Next
doc.Preview() '

2楼
ybil 发表于:2011/7/12 23:56:00
Dim doc As New PrintDoc '定义一个报表
Dim rt As  prt.RenderText '定义一个文本对象
Dim CurRow As Row = Tables("TAXI車輛資料").Current

if  CurRow("修理內容") isnot nothing then
    Dim n As Integer
    For Each s1 As String In CurRow("修理內容").split(" ")
        rt =New prt.RenderText
        rt.Text = s1 '设置文本对象的内容
        rt.x = 26.5
        rt.y = 76+n*5
        rt.Width= 163
        doc.Body.Children.Add(rt) '将文本对象加入到报表
        n+=1
    Next
    doc.Preview()
End if
[此贴子已经被作者于2011-7-13 0:02:40编辑过]
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .04297 s, 2 queries.