以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=34193)

--  作者:tungwun
--  发布时间:2013/6/2 10:30:00
--  [求助]
代码没有加入底线?
rl = new prt.RenderText
If curRow("总数") > 0 Then
rl.Text = Format(CurRow("总数"),"$#0.00")
End If
rl.x = 152
rl.y = 82.5
rl.Style.FontBold = True \'字体加
rl.Style.FontUnderline = True \'加底线
rl.Style.Font = New Font("新細明體", 14, FontStyle.Bold) \'设置字体
doc.body.Children.Add(rl)


--  作者:狐狸爸爸
--  发布时间:2013/6/3 8:28:00
--  
顺序错了,要先设置字体,再设置样式:
 
Dim doc As New PrintDoc \'定义一个报表
Dim rt As New prt.RenderText \'定义一个文本对象
rt.Text = "Hello Foxtable" \'设置文本对象的内容
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中
rt.Style.Font = New Font("宋体", 16, FontStyle.Bold) \'设置字体
rt.Style.FontBold = True
rt.Style.FontUnderline = True
doc.Body.Children.Add(rt) \'将文本对象加入到报表
doc.Preview() \'预览