今天我们带来的教程是使用 Delphi / Lazarus / C++ Builder 从 FastReport VCL 创建 Code 11 条码,一起来看看吧~
Code 11,也称为 USD-8,是一种离散的高密度符 体系,主要用于标记电信设备。
该符 包括以下元素:
- 开始角色;
- 代表数据的符 字符;
- 可选的校验和数字;
- 停止字符。
每个字符的第一个和最后一个元素都是一个条形。一个模块的字符间空间被附加在字符之间,以使字符之间相互分离。
这个字符支持数字(0-9)和连字符(-)。代码11的名称来自这11个字符。
由于代码11的自然密度造成的印刷缺陷会导致扫描仪误读字符。为了弥补这一点,代码11支持一个或两个可选的校验数字。少于10个数字字符的数据输入使用一个校验位,10个或更多的数字使用两个校验位。第一个数字是基于Modulo 11算法,第二个数字是基于Modulo 9算法。
如何在 FastReport VCL 设计器中创建 Code 11/strong>
将 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 .Net | 下载试用
FastReport技术
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!