How to create, print UPC-A in SSRS Reports in ASP.NET, WinForms application?

Create UPC-A Barcodes in SSRS Reports Projects Using .NET Control

Generate & print UPC-A barcodes in SQL Server Reporting Services 2005, 2008, 2008R2, 2012, 2014

  • Generate UPC-A barcodes in Microsoft SQL Server Reporting Services (SSRS) reports.
  • Using Barcode Custom Report Item (CRI) for creating UPC-A, UPCA+2, UPCA+5.
  • Drag & drop UPC-A barcode report item to your Reporting Service report layout page.
  • Completely developed in C# managed code with digital signature.
  • Fully compatible with SQL Server Reporting Services 2005 and 2008 versions.
  • Reliable & mature UPC-A barcode generation for Reporting Service using .NET Barcode Generator.
Here we will explain how to generate UPC-A barcode (a 12-digit linear barcode symbology primarily used for retail product identification in North America) in your SQL Server Reporting Service (SSRS) reports using C#.
  • Step-by-step instructions to generate UPC-A barcodes in SSRS Paginated Reports using a SSRS Barcode Generator library.
  • All UPC-A property settings are configured exclusively in theReport Item Property pane during report design in SSRS
  • Detailed coverage of UPC-A core features: quick generation, customization options (quiet zone indicator, digit spacing, font size), and check digit calculation, all tailored for SSRS integration










Customize UPC-A Barcode in SSRS Reports

Using the OnBarcode SSRS Barcode Generator library, you can customize your UPC-A barcode to fit your SSRS report's layout and compliance requirements. The following customization options are available, all configured in the Report Item Property pane:
  • ShowQuietZoneIndicator: Displays or hides the UPC barcode quiet zone indicator. The default value is true.
  • UPCEANLeadDigitSpace: Sets the space between the first digit and the start character bar. The default value is 0.
  • UPCEANTrailDigitSpace: Sets the space between the stop character bar and the quiet zone indicator. The default value is 0.
  • UPCEANLeadTrailDigitSizeRatio: Controls the font size of the first and last digits relative to the rest of the digits. The default value is 1.0f (all digits same size).
Let's walk through each customization option and how to apply them in your SSRS report.


UPC-A Quiet Zone Indicator

The quiet zone indicator is a small mark at the end of the UPC-A barcode. It denotes the end of the quiet zone (empty space around the barcode), which is critical for scannability.

By default, the C# Barcode Generator library displays this indicator in your SSRS report.

To hide the quiet zone indicator:
  • Set the ShowQuietZoneIndicator property to false in the Report Item Property pane.



Note: Hiding the quiet zone indicator does not remove the quiet zone itself. Ensure the quiet zone (LeftMargin and RightMargin) meets UPC standards (minimum 9X) to maintain scannability in your SSRS report.


UPC-A First, Last Digit Space, Position, and Font Size

You can adjust the spacing, vertical position, and font size of the first and last digits of the UPC-A barcode to improve readability or fit your SSRS report's layout.

Adjust Digit Spacing

Use the following properties to increase the space around the first and last digits (configured in the Report Item Property pane):
  • UPCEANLeadDigitSpace: Increases the space between the first digit and the start bar.
  • UPCEANTrailDigitSpace: Increases the space between the stop character bar and the quiet zone indicator.

Adjust Vertical Position of Digits

Use the following properties to adjust the vertical offset of the first and last digits (configured in the Report Item Property pane):
  • UPCEANLeadDigitYShift: Controls the vertical offset of the first digit in the UPC-A barcode text.
  • UPCEANTrailDigitYShift: Controls the vertical offset of the last digit in the UPC-A barcode text.



Note: Negative values shift the digit upward, while positive values shift it downward.

Adjust Digit Font Size

se the UPCEANLeadTrailDigitSizeRatio property to customize the font size of the first and last digits relative to the rest (configured in the Report Item Property pane). The value represents the ratio of the first/last digit font size to the rest of the digits (e.g., 0.6f means the first/last digits are 60% the size of the other digits).


UPC-A Check Digit Calculation in SSRS Reports

The UPC-A check digit is a critical component for data integrity. It is calculated using a modulo 10 algorithm, based on the weighted sum of the first 11 digits (which include the UPC number system, manufacturer code, and product code). Follow these steps to calculate the UPC-A check digit manually (useful for validating your SSRS dataset data before encoding):
  1. Consider the right-most digit of the 11-digit data as being in an "odd" position. Assign odd/even positions to each digit by moving from right to left.
  2. Sum the digits in all odd positions, then multiply the result by 3.
  3. Sum the digits in all even positions.
  4. Add the two totals calculated in steps 2 and 3.
  5. The check digit is the number that, when added to this total, results in a number evenly divisible by 10.
  6. If the total from step 4 is already evenly divisible by 10, the check digit is "0" (not 10).
Example: If your SSRS dataset Field contains the 11-digit UPC-A data "12345678901", the correct check digit is "2". The full 12-digit UPC-A code would be "123456789012".

Note: If you provide 11 digits in the Data property (bound to your SSRS dataset Field), the SSRS Barcode Generator library will automatically calculate the check digit. If you provide 12 digits, ensure the 12th digit is the correct check digit. Otherwise, the library will generate an invalid UPC-A barcode that cannot be scanned.












Common Asked Questions

What is a GTIN-12 UPC-A barcode?

GTIN-12 is a 12 digits Global Trade Item Number. It is usually encoded in UPC-A barcode. The 12 digits Global Trade Item Number includes 11 digits of data message, and one digit of check sum digit. Using SQL Server Reporting Services Barcode Generation Library, you can input 12-digit GS1 numeric data or 13-digits data with checksum digit in SSRS report barcode item data source.

What is the difference between UPC-A and UPC-E?

Both of UPC-A and UPC-E are UPC barcode. UPC-A is a 12-digit barcode, and UPC-E is a compressed UPC-A with 6 digits code. The UPC-E will be used in limited space for a barcode. You can create both UPC-A and UPC-E images in SSRS reports in report designer and preview UPC barcode in report viewer using .NET SQL Server Reporting Services barcode library.

What is the difference between EAN-13 and UPC-A?

UPC-A Format barcodes have traditionally been used in the North America (USA and Canada), whereas EAN-13 format barcodes have been used throughout the rest of the world. SQL Server Reporting Services Barcode Generator SDK supports both UPC and EAN with add-on symbol barcode generation in SSRS reports in .NET C#/VB.NET class, ASP.NET Core, WinForms, WPF applications.

What is the minimum & maximum size for a UPC-A barcode?

  • The Minimum X-dimension for the UPC-A barcode is 0.0104 inches.
  • The Maximum X-dimension for the UPC-A barcode is 0.0260 inches
You can apply the UPC-A barcode X-dimension and Y-dimension in SSRS report item proeprty settings in report designer using OnBarcode .NET SQL Server Reporting Services Barcode Generator library.







































Start with free trial package:








































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