How to create, print GS1-128 in Crystal Reports in ASP.NET, WinForms application?

Create GS1-128 Barcodes in Crystal Reports Projects Using .NET Control

Create GS1-128 barcode on Crystal Reports using .NET Barcode Generator

  • Robust control stays on Crystal Report once installed
  • Create flexible and dynamic Crystal Report with barcodes using Visual Studio
  • Change field to GS1-128 barcode symbology in Crystal Report by simple clicks
  • Completely written in C#.NET 2.0
  • Draw GS1-128 barcode images in GIF, PNG, JPEG & BITMAP formats
  • Can be used in VB.NET, C#, Managed C++ and Borland Delphi for .NET
  • Print Crystal Reports in either an ASP.NET or Windows Forms applications
  • Able to tackle .NET runtime customization in VB.NET or C#


How to create, print GS1-128 barcode in Crystal Reports in Visual Studio project?

  1. Download Crystal Reports GS1-128 Barcode Generator library
  2. Install Crystal Reports Barcode Generator dll file into Visual Studio .NET project
  3. Start to Create










Introduction of GS1-128 Crystal Reports Barcode Generator

Top
This barcode generator helps you insert GS1-128 into Crystal Report which takes user input. This powerful barcode control helps you integrate .NET applications such as ASP.NET & WinForms with Crystal Report during runtime.

OnBarcode.com provides GS1-128 .NET Barcode Control for Crystal Reports and other barcode control for generating 30+ other linear & 2D bar codes for Crystal Reports with detailed online how-to guide:
  • Linear Barcodes in Crystal Reports: GS1-128, Code 128, EAN-8, UPC-A, UPC-E, Interleaved 2 of 5, MSI Plessey, POSTNET etc.
  • 2D Barcodes in Crystal Reports: including QR Code, Data Matrix, PDF-417




How to Generate GS1-128 in .NET Crystal Reports Barcode SDK

Top
This guide delivers a structured, step-by-step approach to generating GS1-128 (a structured variant of Code 128 for global supply chain identification) in Crystal Reports for .NET within ASP.NET and WinForms projects. It covers core implementation, data encoding rules, barcode characteristics, and dimension configuration to ensure compliance with GS1 standards and seamless integration with Crystal Reports components.


Preparation

We have two step by step tutorials to create new ASP.NET and Windows Forms .net framework projects to print barcodes in .rpt report file in .NET application.


After you have created a new ASP.NET or Windows Forms project with the first barcode printed in the .rpt report, we will learn how to generate and customize GS1-128 (EAN-128) linear barcodes in Crystal Reports in the .NET application.

Print GS1-128 barcodes in Crystal Report

Here we will start to modify the tutorial project to create, insert GS1-128 1d barcode in the Crystal Reports report designer and print the GS1-128 barcode in the report viewer.

In Visual Studio IDE,
  • For ASP.NET project, open file Default.aspx.cs
  • For Windows Forms project, open file Form1.cs
Follow the steps to generate GS1-128 and embed it into a Crystal Report:

  1. Change barcode type from Code 128 to GS1-128. BarcodeType.EAN128;
  2. Assign the target data string (application identifier code + value pairs) to the Data property of the barcode object (map this to a Crystal Reports Parameter field for dynamic data).

linear.Type = BarcodeType.EAN128;



After successfully generating the GS1-128 barcodes in Crystal Reports in your C# ASP.NET/WinForms project, we will further customize the GS1-128 in the report.




GS1-128 Barcode Basic Characteristics for Crystal Reports (C#)

Top

Encodable Character Set

GS1-128 (supported in Crystal Reports for .NET) adheres to these character set rules:

  • Uses a subset of ISO/IEC 646 International Reference Version for GS1 AI element strings.
  • Encodes ASCII values 128–255 (supports international character sets for global supply chain reports).
  • Includes four non-data function characters: FNC1, FNC2, FNC3, FNC4 (only FNC1/FNC3 are used in GS1-128).
  • Features code set selection characters, three start characters, and one stop character.

Note: Do not manually add function characters, code set selection characters, start/stop characters to the Data property. The OnBarcode library auto inserts these chars into the GS1-128 symbol.




Check Digit Configuration

  • GS1-128 includes a mandatory check digit (same as Code 128) for data integrity.
  • The check digit is auto-added by the library before the stop character (no need to set AddCheckSum. This property is non-applicable for GS1-128).
  • The check digit is not displayed in the Human Readable Interpretation (HRI) (optimizes Crystal Reports label layout).



Note: Attempting to set AddCheckSum for GS1-128 will have no effect.




GS1-128 Dimension Settings for Crystal Reports (C#)

Top
You can easily generate GS1-128 with specified barcode image width and height in Crystal Reports report template.
  • Property UOM : Unit of measure (PIXEL/CM/INCH, matches Crystal Reports report units).
  • Property BarcodeWidth and BarcodeHeight : Set the GS1-128 image with specified width and height.
barcode.UOM = UnitOfMeasure.INCH;
barcode.BarcodeWidth = 3.5f;
barcode.BarcodeHeight = 1;



More Size Options



Customize GS1-128 dimensions to fit Crystal Reports layout (Header/Footer/Details sections) using these properties:
  • AutoResize: If true, the barcode library will choose the maximum bar module width and height values. If false, the barcode library will use the developer specified X value for bar module width, and Y value for bar module height.
  • X: Narrow element width (minimum defined by GS1 standards and application specs).
  • Y: Bar module height (ensure it fits Crystal Reports PictureBox bounds).
  • LeftMargin/RightMargin: Quiet zone (minimum 10X to comply with GS1 scanning standards).
Note: Inadequate quiet zone (less than 10X) will cause scanning failures. Test barcode scannability in the Staging environment before Production deployment.




Summary

Top
Here we have explained how to generate, print GS1-128 barcodes in Crystal Reports and customize it using OnBarcode Barcode Generator for Crystal Reports C# library.

Print GS1-128 in Report: Generate GS1-128 in C# and bind it to Crystal Reports for .NET using ReportDocument, CrystalReportViewer, and .rpt file templates (compatible with ASP.NET Web Forms/WinForms PictureBox controls).

GS1 Data Rule: Follow strict GS1 AI formatting for the Data property; do not manually add function/start/stop characters (auto-inserted by the library) to avoid invalid barcodes.

GS1-128 Barcode Configuration: Set dimensions (narrow element width, quiet zone) to comply with GS1 standards and fit Crystal Reports layout (Header/Footer/Details sections), ensuring scannability for supply chain report distribution.













Common Asked Questions

What is the content of GS1-128?

GS1-128 barcode is an application of Code 128, and it is one of the GS1 standard supported barcode symbologies. GS1-128 can contain up to 48 characters of GS1 data characters. It may encode logistical information, such as batch/lot numbers, product serial number, produce date, expiration date, weights, price. OnBarcode .NET Crystal Reports Barcode Generator library supports GS1 data message encoding in GS1-128 in Crystal reports in .NET ASP.NET and Windows applications.

What is the difference between Code 128 and GS1-128?

GS1-128 (also known as EAN-128, UCC-128) is an application of Code 128 supported by GS1 System. GS1-128 encodes a subset of Code 128 encoding characters, and it can encode upto 48 characters in one synbol. Using Crystal Reports for .NET Barcode Generator freeware, you can easily create and customize Code 128 and GS1-128 barcodes in .NET Crystal reports in ASP.NET, MVC, WinForms, WPF apps.

What is the difference between GS1-128 and GTIN 14?

Both GS1-128 and ITF-14 barcodes are 1d, linear barcodes, and both support encoding GS1 business data messages. The GS1-128 barcode can encode multiple GS1 application identities (ID) and their data information, such as serial number, price, production dates. The GTIN 14 (also known as ITF-14, based on Interleaved 2 of 5) can only encode the 14 digits Global Trade Item Number (GTIN).

OnBarcode Crystal Reports for .NET Barcode library allows C#/VB.NET developers easily generating GS1-128 and ITF-14 barcode with GS1 data text encoding in C# Crystal reports ASP.NET web and Windows projects.

What is the function code for GS1-128?

The GS1-128 barcode supports encoding one function code Function Code 1 (FNC1). The FNC1 character should be encoded after GS1 start character. Using Crystal Reports for .NET Barcode Generator SDK, the barcode software will automatically encode the FNC1 character in the right position in the 128 barcode in Microsoft Visual Studio with the Crystal Report Designer extension.

What is the minimum & maximum size for GS1-128 barcode?

  • The minimum width for the X-dimension (the width of the narrowest bar or space) is 0.495 mm.
  • The maximum width for the X-dimension is 1.016 mm
You can customize and apply GS1-128 X dimension through Crystal report item property settings in Crystal Reports .NET reporting projects.




































Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.