Jump to content

Can't preview barcode in iReport


tjhawkins2

Recommended Posts

I upgraded to iReport 2.0.2 today. I'm trying to use barcodes for the first time. I have a very simple barcode Int2of5 with value 1234567890. It shows on the screen, but when I want to view it was a PDF since that's what would be used to view it from my application I'm developing for, it throws errors.

 

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. The method getBarcodeImage(int, Object, boolean, boolean) in the type BcImage is not applicable for the arguments (int, int, boolean, boolean, null, int, int) value = (java.awt.Image)(it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(13,1234567890,true,false,null,0,0));//$JR_EXPR_ID=8$ <-------------> 2. The method getBarcodeImage(int, Object, boolean, boolean) in the type BcImage is not applicable for the arguments (int, int, boolean, boolean, null, int, int) value = (java.awt.Image)(it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(13,1234567890,true,false,null,0,0));//$JR_EXPR_ID=8$ <-------------> 3. The method getBarcodeImage(int, Object, boolean, boolean) in the type BcImage is not applicable for the arguments (int, int, boolean, boolean, null, int, int) value = (java.awt.Image)(it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(13,1234567890,true,false,null,0,0));//$JR_EXPR_ID=8$ <-------------> 3 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:587) at java.lang.Thread.run(Unknown Source)

 

This is all within iReport. I haven't started developing this for my application, so why won't it work in iReport?

Link to comment
Share on other sites

  • 3 months later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

Hello,

 

similar problem here with EAN-13. EAN-128 works fine, but for EAN-13 Barcode I get an error:

 

it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(11,$F{EAN},true,false,null,0,0)

net.sourceforge.barbecue.BarcodeException:ÂInvalidÂdataÂlength

 

I don't really understand because the Field which I use as Barcode Expression has 13 signs and is of type string. Is there any way to get this running?Â

 

I'm using Ireports 2.0.5 and tried to use barbecue1.1 and 1.5beta1 in the classpath.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...