码迷,mamicode.com
首页 > Web开发 > 详细

jasperreports+Ireport开发搭建

时间:2016-10-25 09:37:35      阅读:300      评论:0      收藏:0      [点我收藏+]

标签:manage   rtp   led   odi   method   r.java   str   follow   exe   

1.报表依赖

 <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports</artifactId>
        <version>6.0.0</version>
 </dependency>

2.异常

 org.codehaus.groovy.control.CompilationFailedException

解决方案:

    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>2.4.3</version>
    </dependency>

3.异常报错

    net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font : 
    pdfFontName   : STSong-Light
    pdfEncoding   : UniGB-UCS2-H
    isPdfEmbedded : true
        at net.sf.jasperreports.engine.export.JRPdfExporter.getFont(JRPdfExporter.java:2152)
        at net.sf.jasperreports.engine.export.JRPdfExporter.getChunk(JRPdfExporter.java:1942)
        at net.sf.jasperreports.engine.export.JRPdfExporter.getPhrase(JRPdfExporter.java:1911)
        at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.getPhrase(SimplePdfTextRenderer.java:89)
        at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.render(SimplePdfTextRenderer.java:99)
        at net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:2275)
        at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:985)
        at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:944)
        at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:816)
        at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:519)
        at net.sf.jasperreports.engine.JasperExportManager.exportToPdfFile(JasperExportManager.java:157)
        at net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:505)
        at com.gs.ireport.service.ReportService.main(ReportService.java:64)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

解决方案:

     <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>itext-asian</artifactId>
        <version>5.2.0</version>
    </dependency>

jasperreports+Ireport开发搭建

标签:manage   rtp   led   odi   method   r.java   str   follow   exe   

原文地址:http://www.cnblogs.com/sagech/p/5995341.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!