I want to insert images in my jasper report ,swing application. All images are in one package. I want to set path for images in jasper report.That means, to set project images's paths.When the entire project location is changed, there is an exception saying no images found. Please let me know how to set the image paths.
under source package
|-Images // my images are in here
|-Reports // where my jasper reports are in
preguntado el 08 de noviembre de 11 a las 15:11
You haven't posted many particulars, but i have ran into a similar issue when dealing with absolute/relative paths with Jasper Report.
There is a known "discomfort" or a bug (if you want to call it that way) with Jasper Report not being able to set or use relative paths to your project resources (subreports, images etc) especially if you are compiling the reports with the IREPORT designer tool.
I am working with jasper report and IREPORT 4.1.1 and every time i compile the JRXML to a .jasper file, my paths are absolute. This causes "havoc" when the whole project is moved to a different machine. In order to use relative paths to my reports i have to compile the reports via programming means i.e in my Java application. In a nutshell, the java utility method i am using reads the JRXML file and substitutes the absolute path with a relative path and then compiles the report.
Take a look at this forum, which has some different answers of how to do it.
For Images and Subreport Path is required. I am using ./ in default prompt to work from any where i kept everything in single folder. SUBREPORT_DIR Required path same if location is different for different element then you have to pass though Parameter section as Above Post. Please check his link also.