编程语言
首页 > 编程语言> > java-如何在jasper报告中显示图像

java-如何在jasper报告中显示图像

作者:互联网

我创建了一个jasper报告.但是现在我需要在该jasper报告中放置徽标,
我将报告和徽标放在同一文件夹中,但无法运行该报告,它说

   net.sf.jasperreports.engine.JRException: Byte data not found at : kh_logo.jpg

如果我给出完整路径,则jar文件会产生问题,然后在jar文件报告中找不到该徽标图像,我正在使用Net Bean,请帮忙

 I am using netbeans and i am placing report and logo in the src folder , but when I 
click on print report it is not able to find that logo

解决方法:

您的图像必须位于类路径上的文件夹中,并以相对方式引用.

标签:java,jasper-reports
来源: https://codeday.me/bug/20191012/1902489.html