首页 > 代码库 > jasperreports+Ireport开发搭建
jasperreports+Ireport开发搭建
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开发搭建
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。