Class Barcode128
Generates the Code128 barcode.
Inherited Members
Namespace: FastReport.Barcode
Assembly: FastReport.Base.dll
Syntax
public class Barcode128 : LinearBarcodeBase
Remarks
This barcode supports three code pages: A, B and C. You need to set appropriate code page in the barcode text, or use the auto encode feature. See the AutoEncode property for more details.
Examples
This example shows how to configure the BarcodeObject to display Code128 barcode.
BarcodeObject barcode;
...
barcode.Barcode = new Barcode128();
(barcode.Barcode as Barcode128).AutoEncode = false;
Constructors
Barcode128()
Initializes a new instance of the Barcode128 class with default settings.
Declaration
public Barcode128()
Properties
AutoEncode
Gets or sets a value that determines whether the barcode should automatically use appropriate encoding.
Declaration
public bool AutoEncode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
You may use this property to encode data automatically. If you set it to false, you must specify the code page inside the data string. The following control codes are available:
Sequence | Code128 control code |
---|---|
&A; | START A / CODE A |
&B; | START B / CODE B |
&C; | START C / CODE C |
Examples
The following example shows how to specify control codes:
BarcodeObject barcode;
barcode.Barcode = new Barcode128();
(barcode.Barcode as Barcode128).AutoEncode = false;
barcode.Text = "&C;1234&A;ABC";
IsNumeric
Gets the value indicating that the barcode is numeric.
Declaration
public override bool IsNumeric { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Methods
Assign(BarcodeBase)
Assigns properties from other, similar barcode.
Declaration
public override void Assign(BarcodeBase source)
Parameters
Type | Name | Description |
---|---|---|
BarcodeBase | source | Barcode object to assign properties from. |