【问题标题】:Ireports and barcode报告和条形码
【发布时间】:2011-04-11 14:03:52
【问题描述】:

我正在做一个包含条形码的报告,但是当我编译它时,它给了我一个错误

    Compilation exceptions: com.jaspersoft.ireport.designer.compiler.ErrorsCollector@eed1de
  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

【问题讨论】:

    标签: java ireport barcode


    【解决方案1】:

    检查/web-inf/lib文件夹中是否有文件barbecue-1.1.jar(它包含BcImage.class)。如果没有,请添加它。

    【讨论】:

    • 但是当给我那个错误时我正在预览它。那个文件夹在哪里?
    • 只需下载该文件,将其添加到类路径中,但仍然给我同样的错误
    • 检查.jar文件是否包含BcImage.class,如果不是这个类在iReport-utils-2.0.1.jar中,那么把它也放在/web-inf/lib
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多