原創|使用教程|編輯:何家巧|2022-12-26 10:49:49.930|閱讀 190 次
概述:今天我們帶來的教程是使用 Delphi / Lazarus / C++ Builder 從 FastReport VCL 創建 Code 11 條碼,一起來看看吧~
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
Fastreport是目前世界上主流的圖表控件,具有超高性價比,以更具成本優勢的價格,便能提供功能齊全的報表解決方案,連續三年蟬聯全球文檔創建組件和庫的“ Top 50 Publishers”獎。
Code 11,也稱為 USD-8,是一種離散的高密度符號體系,主要用于標記電信設備。
該符號包括以下元素:
每個字符的第一個和最后一個元素都是一個條形。一個模塊的字符間空間被附加在字符之間,以使字符之間相互分離。
這個字符支持數字(0-9)和連字符(-)。代碼11的名稱來自這11個字符。
由于代碼11的自然密度造成的印刷缺陷會導致掃描儀誤讀字符。為了彌補這一點,代碼11支持一個或兩個可選的校驗數字。少于10個數字字符的數據輸入使用一個校驗位,10個或更多的數字使用兩個校驗位。第一個數字是基于Modulo 11算法,第二個數字是基于Modulo 9算法。
如何在 FastReport VCL 設計器中創建 Code 11?
將 obCatBarcode 組件添加到報表中并選擇 Code 11。
接下來,我們進入條形碼編輯器:
代碼 ― 條形碼數值區域;
條形碼類型——您可以在編輯器中更改條形碼類型,無需向報表添加新組件;
轉到 obCatBarcode 組件的屬性。
在代碼字段中在條形碼編輯器中寫入的文本將被傳輸到表達式字段。如果表達式為空,將顯示文本字段中的文本。從 Delphi / Lazarus / C++ Builder 代碼創建 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使用教程中關于“如何使用 Delphi / Lazarus / C++ Builder 從 FastReport VCL 創建 Code 11 條碼”的相關內容就到這里了,更多教程進入慧都官網查看。
更多產品授權信息點擊查看FastReport VCL價格,或者咨詢慧都在線客服。
FastReport技術QQ群:536197826 歡迎進群一起討論
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn