• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Print Barcodes in JasperReport-iReport

 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the following error when I try and print a jasperreport from my web app.

[5/6/11 15:53:42:903 CDT] 0000001f SystemOut O PDFReportGenerator:17 net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :
Source text : it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(2,$F{VENDORCODE},false,false,null,0,0)

When I do print from the iReport IDE it works fine.

 
David Garratt
Ranch Hand
Posts: 212
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could be that it's not finding the jar file or one of it's dependancies required to execute your it.businesslogic.ireport.barcode.BcImage.getBarcodeImage

I am assuming thats your code and it's returning a Image to be displayed by the report.

 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Garratt wrote:It could be that it's not finding the jar file or one of it's dependancies required to execute your it.businesslogic.ireport.barcode.BcImage.getBarcodeImage

I am assuming thats your code and it's returning a Image to be displayed by the report.



That appears to be the issue. However, I do not know what jar file it needs. I have placed the iReport.jar in my WEB-INF folder along with the barbecue-1.5-beta.jar and barcode.jar.
 
David Garratt
Ranch Hand
Posts: 212
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use a similar approach for my application - albeit a Swing desktop application rather than a web application. It's rather overkill but I normally include the entire lib directory that accompanies JaserReports distribution zip with my application. I probably don't need them all - but better safe than sorry.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic