2011-04-11 57 views
0

我做的,它包含條形碼的報告,但是當我編譯它,它給了我一個錯誤Ireports和條形碼

Compilation exceptions: [email protected] 
    net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 
    1. it.businesslogic.ireport.barcode.BcImage cannot be resolved to a type     
    value = (java.awt.Image)(it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(26,"*"+((java.lang.String)field_NRIDENTSNS.getValue())+"*",false,false,null,0,0)); //$JR_EXPR_ID=9$           
    <--------------------------------------> 
    2. it.businesslogic.ireport.barcode.BcImage cannot be resolved to a type     
    value = (java.awt.Image)(it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(26,"*"+((java.lang.String)field_NRIDENTSNS.getValue())+"*",false,false,null,0,0)); //$JR_EXPR_ID=13$           
    <--------------------------------------> 
    3. it.businesslogic.ireport.barcode.BcImage cannot be resolved to a type     
    value = (java.awt.Image)(it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(26,"*"+((java.lang.String)field_NRIDENTSNS.getOldValue())+"*",false,false,null,0,0)); //$JR_EXPR_ID=9$           
    <--------------------------------------> 
    4. it.businesslogic.ireport.barcode.BcImage cannot be resolved to a type     
    value = (java.awt.Image)(it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(26,"*"+((java.lang.String)field_NRIDENTSNS.getOldValue())+"*",false,false,null,0,0)); //$JR_EXPR_ID=13$           
    <--------------------------------------> 
    5. it.businesslogic.ireport.barcode.BcImage cannot be resolved to a type     
    value = (java.awt.Image)(it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(26,"*"+((java.lang.String)field_NRIDENTSNS.getValue())+"*",false,false,null,0,0)); //$JR_EXPR_ID=9$           
    <--------------------------------------> 
    6. it.businesslogic.ireport.barcode.BcImage cannot be resolved to a type     
    value = (java.awt.Image)(it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(26,"*"+((java.lang.String)field_NRIDENTSNS.getValue())+"*",false,false,null,0,0)); //$JR_EXPR_ID=13$           
    <--------------------------------------> 
    6 errors  at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:191)  at com.jaspersoft.ireport.desig![enter image description here][1]ner.compiler.IReportCompiler.run(IReportCompiler.java:494)  at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)  at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) 
Compilation running time: 4.807 

什麼,我做錯了什麼?我使用ireports 3.7.0

,這是我的類路徑:

http://img857.imageshack.us/img857/6145/classpath.png

回答

2

檢查是否有文件barbecue-1.1.jar(它包含BcImage.class)在/web-inf/lib文件夾中。如果沒有,請添加它。

+0

但是當我給出錯誤時,我會預覽它。那個文件夾在哪裏? – Luis 2011-04-11 14:35:38

+0

剛剛添加我的類路徑 – Luis 2011-04-11 14:47:42

+0

只是下載該文件,將其添加到類路徑中,但繼續給我相同的錯誤 – Luis 2011-04-11 14:55:55