* We are using latest iReport-3.5.3 to test our Barcode for Java library.
If developer can find any problem with previous version of iReport, please send email to support@barcodelib.com.
Add barcode.jar to report classpath.
Select menu "Tools", "Options", then select "classpath" tab. add barcode.jar to the classpath
Drag an image item in Palette to report
Click "Cancel" button, in "Select an image file" window.
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.barcodelib.barcode.BarcodeJasperRenderer(com.barcodelib.barcode.BarcodeJasperFactory.createDataMatrix("123456789", 0, 0, 5))";
You can preview the data matrix barcode in your report.
Set property "Image Expression" to "new com.barcodelib.barcode.BarcodeJasperRenderer(com.barcodelib.barcode.BarcodeJasperFactory.createLinear(22, $F{Your_Data_Field_Name}))";