Foxtable(狐表)用户栏目专家坐堂 → 专业报表 打印文字在出现空格,跳到下一行


  共有11117人关注过本帖树形打印复制链接

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

帅哥哟,离线,有人找我吗?
tungwun
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:423 积分:4231 威望:0 精华:0 注册:2009/5/16 21:42:00
专业报表 打印文字在出现空格,跳到下一行  发帖心情 Post By: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() '


 回到顶部
帅哥哟,离线,有人找我吗?
ybil
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:521 积分:4910 威望:0 精华:7 注册:2008/9/2 22:22:00
  发帖心情 Post By: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编辑过]

 回到顶部