Foxtable(狐表)用户栏目专家坐堂 → [求助]


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

主题:[求助]

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


加好友 发短信
等级:一尾狐 帖子:423 积分:4243 威望:0 精华:0 注册:2009/5/16 21:42:00
[求助]  发帖心情 Post By:2012/4/7 10:33:00 [只看该作者]

请问已下打印代码中车牌号码    如何打印成条码?


Dim doc As New PrintDoc '定義一個報表
Dim rt As prt.RenderText '定義一個文本對像
Dim rm As prt.RenderImage '定義一個圖形隊形
Dim CurRow As Row = Tables("TAXI").Current
Dim n As Integer
For Each s1 As String In CurRow("修理內容").split(",")
    rt =New prt.RenderText
    rt.Text = s1 '設置文本對像內容
    rt.x = 12
rt.Style.FontSize = 14 '字體大小為10磅字
        rt.y = 75+N*5
    rt.Width= 172
    doc.Body.Children.Add(rt) '將文本對像加入到報表
    n+=1
Next      



rt = new prt.RenderText
rt.Text = CurRow("车牌号码")
rt.x = 103
rt.y = 50
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字

rt = new prt.RenderText
rt.Text = Format(CurRow("日期"),"dd-MM-yyyy")
rt.x = 165
rt.y = 59
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字

rt = new prt.RenderText
rt.Text = CurRow("公司")
rt.x = 30
rt.y = 49
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字


rt = new prt.RenderText
rt.Text = CurRow("型號")
rt.x = 102
rt.y = 59
doc.body.Children.Add(rt)
rt.Style.FontSize = 12 '字體大小為10磅字


rt = new prt.RenderText
rt.Text = CurRow("單號")
rt.x = 175
rt.y = 24
doc.body.Children.Add(rt)
rt.Style.FontSize = 16 '字體大小為10磅字


rt = new prt.RenderText
rt.Text = Format(CurRow("總計"),"$#0.00")
rt.x = 173
rt.y = 162
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字


rt = new prt.RenderText
rt.Text = Format(CurRow("單價"),"$#0.00")
rt.x = 173
rt.y = 76
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字

rt = new prt.RenderText
If curRow("分類價2") > 0 Then
rt.Text = Format(CurRow("分類價2"),"$#0.00")
End If
rt.x = 173
rt.y = 81
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字

rt = new prt.RenderText
If curRow("分類價3") > 0 Then
rt.Text = Format(CurRow("分類價3"),"$#0.00")
End If
rt.x = 173
rt.y = 86
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字

rt = new prt.RenderText
If curRow("分類價4") > 0 Then
rt.Text = Format(CurRow("分類價4"),"$#0.00")
End If
rt.x = 173
rt.y = 91
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字


rt = new prt.RenderText
If curRow("分類價5") > 0 Then
rt.Text = Format(CurRow("分類價5"),"$#0.00")
End If
rt.x = 173
rt.y = 96
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字

rt = new prt.RenderText
If curRow("分類價6") > 0 Then
rt.Text = Format(CurRow("分類價6"),"$#0.00")
End If
rt.x = 173
rt.y = 102
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字

rt = new prt.RenderText
If curRow("分類價7") > 0 Then
rt.Text = Format(CurRow("分類價7"),"$#0.00")
End If
rt.x = 173
rt.y = 107
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字

rt = new prt.RenderText
If curRow("分類價8") > 0 Then
rt.Text = Format(CurRow("分類價8"),"$#0.00")
End If
rt.x = 173
rt.y = 113
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字


rt = new prt.RenderText
If curRow("分類價9") > 0 Then
rt.Text = Format(CurRow("分類價9"),"$#0.00")
End If
rt.x = 173
rt.y = 120
doc.body.Children.Add(rt)
rt.Style.FontSize = 14 '字體大小為10磅字

Doc.PrinterName ="FinePrint"
doc.Print()

Syscmd.Project.Save()
Syscmd.Row.Lock()

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


加好友 发短信
等级:九尾狐 帖子:2193 积分:13914 威望:0 精华:2 注册:2012/2/25 10:59:00
  发帖心情 Post By:2012/4/7 10:52:00 [只看该作者]

帮助写得很清楚

 

Dim doc As New PrintDoc
Dim
rbc As New prt.RenderBarCode()
rbc.Height =
25
rbc.BarCodeType = BarCodeEnum.Code39
rbc.BarDirection = BarDirectionEnum.Normal
rbc.Text =
"123456"
rbc.ShowText =
True
doc.Body.Children.Add(rbc)
Doc.Preview()

[此贴子已经被作者于2012-4-7 10:54:20编辑过]

 回到顶部