How to set up the LOGMARS barcode in FastReport .NET

2021-09-06

LOGMARS stands for Logistics Applications of Automated Marking and Reading Symbols. It is a specification used by the U.S. government for the military goods supply.

LOGMARS is a standard based on the Code 39 barcode. Code 39 consists of self-checking barcode symbols that usually do not require a check digit. However, in applications that require high accuracy, a check digit modulo 43 is added after the data. Since LOGMARS is used by the military, the check digit is mandatory. This barcode is defined by the military standard MIL-STD-129, which contains not only the information about where the barcode should be placed on the military cargo, but also what kind of data and how long it should be in accordance with military specifications.

Alike Code 39, LOGMARS can encode uppercase Latin letters, all numbers, and special characters (such as *, -, $, %, (space), ., /, and +).

Please note that in FastReport .NET the Code 39 barcode always contains check digits and has no data length limit. This means that it can be used as a full implementation of LOGMARS.

Adding a barcode from the designer

You do not need to look for LOGMARS in the designer. 

Select Code 39 and add it to the report page. All properties of this barcode were described in the article “How to create CODE 39 and CODE 39 Extended barcodes

Enter the value “DAHC9488O0007” into the barcode editor and save. 

Creating a Code 39 barcode using the code

//Create a new report object
Report report = new Report();
//Create a report page
ReportPage page = new ReportPage();
//Create a unique identifier 
page.CreateUniqueName();
//Add it to the collection of report pages
report.Pages.Add(page);
//Create a new DataBand
DataBand dataBand = new DataBand();
//with a unique identifier
dataBand.CreateUniqueName();
//and add it to the band collection
page.Bands.Add(dataBand);
//Create a barcode object
FastReport.Barcode.BarcodeObject barcode = new FastReport.Barcode.BarcodeObject();
 //Set a barcode type
 barcode.Barcode = new FastReport.Barcode.Barcode39();
//Set the numeric combination for encoding
barcode.Text = "DAHC9488O0007";
//Place the barcode on the page
 barcode.Parent = dataBand;
 //Set the size of the object
barcode.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 3);
//Show the report
report.Show();

As a result, we will get the following barcode:

Example of Code 39 barcode

Now you know a little more about the LOGMARS barcode as a part of the military specification. With FastReport .NET you can create this standard by configuring Code 39 barcode. 

November 20, 2024

Localization and Language Switching in FastReport VCL

FastReport VCL supports 40 languages for interface localization and allows you to change the language on the fly through menus or code, without recompilation.
November 01, 2024

New Features of the FastReport VCL Editor

We are considering new features of the report editor: extension lines, highlighting of intersecting objects, updated report and data trees.
October 30, 2024

Using Styles When Creating Reports in FastReport VCL

The article discusses one of the new features of FastReport VCL — the use of styles and style sheets.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 66 Canal Center Plaza, Ste 505, Alexandria, VA 22314

© 1998-2024 Fast Reports Inc.