Back to Devexpress

BarCodeGeneratorBase.CalcCheckSum Property

corelibraries-devexpress-dot-xtraprinting-dot-barcode-dot-barcodegeneratorbase.md

latest2.6 KB
Original Source

BarCodeGeneratorBase.CalcCheckSum Property

Gets or sets whether to calculate a checksum for the bar code.

Namespace : DevExpress.XtraPrinting.BarCode

Assembly : DevExpress.Printing.v25.2.Core.dll

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
[DefaultValue(true)]
public virtual bool CalcCheckSum { get; set; }
vb
<DefaultValue(True)>
Public Overridable Property CalcCheckSum As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true if the barcode object needs a checksum to be calculated; otherwise, false.

|

Remarks

A checksum is calculated for the bar code’s text represented by its TextBrickBase.Text property. If the CalcCheckSum property is set to false , then the smaller version of the bar code is shown (without “checksum” bars).

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CalcCheckSum property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

reporting-add-a-bar-code-to-a-report/CS/Form1.cs#L117

csharp
// Adjust the properties specific to the bar code type.
((Code39Generator)barCode.Symbology).CalcCheckSum = false;
((Code39Generator)barCode.Symbology).WideNarrowRatio = 2.5F;

See Also

Use Barcodes

BarCodeGeneratorBase Class

BarCodeGeneratorBase Members

DevExpress.XtraPrinting.BarCode Namespace