原創(chuàng)|使用教程|編輯:何家巧|2022-12-26 10:49:49.930|閱讀 190 次
概述:今天我們帶來(lái)的教程是使用 Delphi / Lazarus / C++ Builder 從 FastReport VCL 創(chuàng)建 Code 11 條碼,一起來(lái)看看吧~
# 界面/圖表報(bào)表/文檔/IDE等千款熱門(mén)軟控件火熱銷(xiāo)售中 >>
相關(guān)鏈接:
Fastreport是目前世界上主流的圖表控件,具有超高性?xún)r(jià)比,以更具成本優(yōu)勢(shì)的價(jià)格,便能提供功能齊全的報(bào)表解決方案,連續(xù)三年蟬聯(lián)全球文檔創(chuàng)建組件和庫(kù)的“ Top 50 Publishers”獎(jiǎng)。
Code 11,也稱(chēng)為 USD-8,是一種離散的高密度符號(hào)體系,主要用于標(biāo)記電信設(shè)備。
該符號(hào)包括以下元素:
每個(gè)字符的第一個(gè)和最后一個(gè)元素都是一個(gè)條形。一個(gè)模塊的字符間空間被附加在字符之間,以使字符之間相互分離。
這個(gè)字符支持?jǐn)?shù)字(0-9)和連字符(-)。代碼11的名稱(chēng)來(lái)自這11個(gè)字符。
由于代碼11的自然密度造成的印刷缺陷會(huì)導(dǎo)致掃描儀誤讀字符。為了彌補(bǔ)這一點(diǎn),代碼11支持一個(gè)或兩個(gè)可選的校驗(yàn)數(shù)字。少于10個(gè)數(shù)字字符的數(shù)據(jù)輸入使用一個(gè)校驗(yàn)位,10個(gè)或更多的數(shù)字使用兩個(gè)校驗(yàn)位。第一個(gè)數(shù)字是基于Modulo 11算法,第二個(gè)數(shù)字是基于Modulo 9算法。
如何在 FastReport VCL 設(shè)計(jì)器中創(chuàng)建 Code 11?
將 obCatBarcode 組件添加到報(bào)表中并選擇 Code 11。
接下來(lái),我們進(jìn)入條形碼編輯器:
代碼 ― 條形碼數(shù)值區(qū)域;
條形碼類(lèi)型——您可以在編輯器中更改條形碼類(lèi)型,無(wú)需向報(bào)表添加新組件;
轉(zhuǎn)到 obCatBarcode 組件的屬性。
在代碼字段中在條形碼編輯器中寫(xiě)入的文本將被傳輸到表達(dá)式字段。如果表達(dá)式為空,將顯示文本字段中的文本。從 Delphi / Lazarus / C++ Builder 代碼創(chuàng)建 Code 11 條碼
uses frxBarcod; procedure TForm1.Button1Click(Sender: TObject); var bc: TfrxBarcodeView; begin bc := TfrxBarcodeView(frxReport1.FindObject('BarCode1')); {Set barcode type} bc.BarType := bcCode11; {Set a fixed barcode value} bc.Text := '123456'; {Set the calculated barcode value} //bc.Expression := '<YourDatasetName."FieldName1"> + <YourDatasetName."FieldName2">'; {Set whether to calculate the checksum and add it to the end of the barcode} bc.CalcCheckSum := False; {Set the scale at which the barcode will be displayed} bc.Zoom := 2; {Set the rotation angle of the barcode. It can take values 0, 90, 180, 270} bc.Rotation := 0; {Specify whether to set the width of the barcode depending on its content.} {If set to False, Zoom property will be set to keep the barcode width fixed} bc.AutoSize := True; {Set the color of the barcode background} bc.Color := clNone; {Set the color of the barcode lines} bc.ColorBar := clBlack; {Set whether to display text at the bottom of the barcode} bc.ShowText := True; frxReport1.ShowReport(); end;
本次FastReport使用教程中關(guān)于“如何使用 Delphi / Lazarus / C++ Builder 從 FastReport VCL 創(chuàng)建 Code 11 條碼”的相關(guān)內(nèi)容就到這里了,更多教程進(jìn)入慧都官網(wǎng)查看。
更多產(chǎn)品授權(quán)信息點(diǎn)擊查看FastReport VCL價(jià)格,或者咨詢(xún)慧都在線(xiàn)客服。
FastReport技術(shù)QQ群:536197826 歡迎進(jìn)群一起討論
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn