iReport Barcode Generation



Java Barcode is a iReport barcode generator which generates high quality 1D (linear) and 2D (matrix) barcodes in iReport and Jasper Reports projects.



Libraries Needed





How to generate barcodes in Jasper Reports using Java Barcode?

  1. Create a new report.

  2. Add barcode.jar to report classpath.

    Select menu "Tools", "Options", then select "classpath" tab. add barcode.jar to the classpath

  3. Drag an image item in Palette to report

  4. Click "Cancel" button, in "Select an image file" window.

  5. Select the image item, and edit it's properties.

    Set property "Expression Class" to "net.sf.jasperreports.engine.JRRenderable";

    Set property "Image Expression" to "new com.onbarcode.barcode.jasper.JasperRenderer( com.onbarcode.barcode.jasper.BarcodeJasperFactory.createDataMatrix("123456789", 0, 0, 3))";

  6. You can preview the data matrix barcode in your report.

  7. Source Code for class BarcodeJasperFactory.java




How to generate barcodes using data from data source?

  1. Define the data field in your jasper report

  2. Set property "Image Expression" to "new com.onbarcode.barcode.jasper.JasperRenderer( com.onbarcode.barcode.jasper.BarcodeJasperFactory.createLinear(12, $F{data_field}))";

  3. Source Code for class BarcodeJasperFactory.java




Java Reporting Barcode Generation Guide

Jasper Reports Barcode Generation     |     iReport Barcode Generation     |     Eclipse BIRT Barcode Generation



Barcode Generation Guide for .NET / Java Developers

.NET Barcode Generation     |     C# Barcode Generation     |     ASP.NET Barcode Generation     |     VB.NET Barcode Generation

Java Barcode Generation