Home  >  Products  >  Java Barcode  >  Java Barcode Generation Guide  >  Jasper Reports Barcode Generator

Jasper Barcode, Barcode Generation in Jasper Reportes

Jasper Barcode offers the most affordable Java barcode generator for Jasper Reports reporting solutions.

Generate barcodes in Jasper Reports

Create a new Jasper report template

  • 1. Import java barcode class
    <import value="com.keepdynamic.barcode.generator.jasperreports.BarcodeFactory"/> 
  • 2. Insert a barcode image into the report template
    <image scaleImage="Clip" hAlign="Center"> 
        <reportElement x="30" y="60" width="300" height="240"/> 
        <imageExpression class="net.sf.jasperreports.engine.JRRenderable">
    <![CDATA[new com.keepdynamic.barcode.generator.jasperreports.BarCodeRenderer(BarcodeFactory.createLinear(8, "123456789"))]]> </imageExpression> </image>
  • 3. If barcode value is getting from database. Define the data field and replace barcode data in the above code with $F{DataFieldName}.
    For the above code, replace "123456789" with $F{DataFieldName}

Jasper Report Barcode - Barcode Type Property Settings