This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Print Barcodes in JasperReport-iReport

 
Ranch Hand
Posts: 1948
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.

 
Ranch Hand
Posts: 249
Mac Eclipse IDE 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: 1948
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: 249
Mac Eclipse IDE 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.
 
This will take every ounce of my mental strength! All for a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!