以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助] (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=18241) |
-- 作者:tungwun -- 发布时间: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 -- 发布时间:2012/4/7 10:52:00 -- 帮助写得很清楚
Dim doc As New PrintDoc [此贴子已经被作者于2012-4-7 10:54:20编辑过]
|