aspose file tools*
The moose likes Other Open Source Projects and the fly likes Print Barcodes in JasperReport-iReport Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Print Barcodes in JasperReport-iReport" Watch "Print Barcodes in JasperReport-iReport" New topic
Author

Print Barcodes in JasperReport-iReport

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
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

Joined: Aug 08, 2003
Posts: 198

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

Joined: Nov 16, 2004
Posts: 1466
    
    1
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

Joined: Aug 08, 2003
Posts: 198

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.
 
Consider Paul's rocket mass heater.
 
subject: Print Barcodes in JasperReport-iReport