Code 128 Character Encoding in SSRS
Encoding Character Sets
Code 128 supports a full set of characters for enterprise SSRS reporting scenarios.
Supported character sets:
Supported character sets:
- All 128 full ASCII characters defined in ISO/IEC 646.
- Extended ASCII characters (128–255, ISO/IEC 8859-1 Latin 1) using FNC4.
- Four non-data function characters.
- Four code-set selection characters.
- Three start characters.
- One stop character.
Code 128 Code Sets (A, B, C)
Code 128 uses three optimized code sets to maximize data density in SSRS reports.
- Code Set A: Supports uppercase letters, numbers, and control characters.
- Code Set B: Supports full alphanumeric and lowercase text.
- Code Set C: Supports compact numeric pairs (high-density number encoding).
- Use CODE128 to let the library auto-select the best code set.
- Manually force a set using CODE128A, CODE128B, or CODE128C.
- All type settings are mirrored in SSRS Report Item Property.
Note: Incorrect manual code sets may cause invalid barcodes in published SSRS reports.
Code 128 Function Characters (FNC)
Function characters (FNC) enable specialized barcode behavior in SSRS supply chain and logistics reports.
- FNC1: Used for GS1 / GS1-128 (logistics and supply chain SSRS reports).
- FNC2: Used for message append operations.
- FNC3: Used for scanner initialization commands.
- FNC4: Used to extend character sets to ISO/IEC 8859-1.
Code 128 Check Digit Calculation
Code 128 includes a mandatory Mod 103 check digit.
- The check digit is auto-generated and cannot be disabled.
- The AddCheckSum property does not apply to Code 128.
- The SSRS Barcode library always computes and appends the check digit before the stop character.
- The check digit is not visible in Human Readable Interpretation (HRI).
Note: Do not attempt to override check digits in SSRS Report Item Property; it will break barcode validity.
Code 128 Human Readable Interpretation (HRI) in SSRS
HRI is the readable text displayed with the Code 128 barcode.
To show HRI below the barcode:
To show HRI below the barcode:
- Use default properties in SSRS Report Item Property.
- Set TextMargin to a negative value.
- Adjust margins to avoid overlapping the barcode symbol.
Code 128 Dimension & Size Settings
All dimension properties are configured in SSRS Report Item Property.
Configurable properties:
Configurable properties:
- UOM (Unit of Measure): PIXEL, CM, or INCH.
- X: Width of the narrow bar module.
- Y: Height of the barcode module.
- LeftMargin & RightMargin: Quiet zones (minimum 10X).
Note: Insufficient quiet zones will make barcodes unreadable after Report Deployment to the Web Portal.
GS1 Data Encoding in Code 128 (GS1-128)
Code 128 is fully compatible with the GS1 standard for SSRS supply chain reports.
- To encode GS1 data, use GS1-128 / EAN-128 mode.
- Enable FNC1 to mark the barcode as GS1-compliant.
- Bind GS1-formatted strings from a Calculated Field in your SSRS dataset.
- Configure related properties in the SSRS Report Item Property panel.
Summary
This document provides a complete workflow for generating Code 128 barcodes using C# within SQL Server Reporting Service .NET projects. Every configuration related to Code 128, including encoding, code sets, function characters, check digits, HRI appearance, dimensions, quiet zones, and GS1 support , is managed through the Report Item Property panel in report design.
Common Asked Questions
What is the barcode Code 128 text code?
Code 128 barcode is a high-density 1d barcode symbology, which encodes digits, letters, control characters, and full ASCII 128 characters.
Using SQL Server Reporting Services barcode generator library, you can create, print, insert Code 128 barcodes in SSRS report table cells, preview the Code 128 barcodes in SSRS
report viewer in .NET ASP.NET Core, Windows Forms projects.
What is Code 128 barcode maximum length?
There is no specific definition about Code 128 barcode maximum number of characters in Code 128 ISO 15417 standard.
However some Code 128 standards will provide the limits. GS1-128 has limits the maximum length of Code 128 data to 48 characters.
Using SQL Server Reporting Services Barcode library, you will encode and generate ISO standard Code 128 and application approved Code 128 barcodes, such as GS1-128 in SSRS reports in .NET web and Windows applications.
However some Code 128 standards will provide the limits. GS1-128 has limits the maximum length of Code 128 data to 48 characters.
Using SQL Server Reporting Services Barcode library, you will encode and generate ISO standard Code 128 and application approved Code 128 barcodes, such as GS1-128 in SSRS reports in .NET web and Windows applications.
What is the check digit for code 128?
Code 128 barcode contains a last digit of mandatory check digit (checksum) character, which is based on module 103 (mod 103).
Code 128 check digit will not be displayed in the Code 128 human readable text and will not be returned by the Code 128 barcode scanners.
Using SQL Server Reporting Services barcode freeware, the generator software will automatically calculate the check character and insert into the Code 128 barcode
in Visual Studio .NET SSRS reports ASP.NET Core, Windows Forms projects.
What is Code 128 barcode commonly used for?
Code 128 barcode is a common linear barcode type used in:
- Food and non-food industries
- Shipping and packing industry
- Health, public sector and government bodies
Is Code 128 barcode better than Code 39?
Both Code 128 and Code 39 are popular 1d barcode symbologies.
Code 128 is more compact than Code 39, supporting more data to be encoded in a smaller space.
SQL Server Reporting Services Barcode library allows C#/VB.NET developers to encoding and printing both Code 128 and Code 39
using Microsoft Visual Studio with the SSRS Report Designer extension.
How to scan, read Code 128 barcodes?
To scan, read and decode the Code 128 barcodes from SSRS reports,
you can download and install OnBarcode free Code 128 barcode scanner software, or use barcode scanner device, or
smart phone (iOS or Android) camera with 3rd party barcode apps installed.
