我创建了一个 jasper 报告。但现在我需要在该 jasper 报告中放置 Logo , 我将报告和 Logo 放在同一文件夹中,但我无法运行该报告,它说
net.sf.jasperreports.engine.JRException: Byte data not found at : kh_logo.jpg
如果我给出完整路径,那么 jar 文件会产生问题,然后在 jar 文件报告中找不到该 Logo 图像,我正在使用 net beans,请帮忙
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报告中显示图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10976318/