Hi all:
What I need to do is like a catalog. There's gonna be Items and the item's element are field of a database. In Example: Item's picture is a path to the picture stored as a string in the database.
Should I just put that field name into the image expression field? or I have to do a more complex walkaround.
thanks anyway.
Matias
pd: this new forum looks great, congratulations
What I need to do is like a catalog. There's gonna be Items and the item's element are field of a database. In Example: Item's picture is a path to the picture stored as a string in the database.
Should I just put that field name into the image expression field? or I have to do a more complex walkaround.
thanks anyway.
Matias
pd: this new forum looks great, congratulations
4 Answers:
Posted on July 19, 2006 at 7:57pm
thanks for the fast feedback.
Well the question was becouse ireport is giving me a error while testing with blank datasource. It tells me that there's no image.
I realize that it happens even with the images I set in design time. for example: "../logo/logo.jpg".
It's shown correctly on design time but on testing iReport gives me this error.
net.sf.jasperreports.engine.JRException: Image not found : ../logo/logo.jpg
could it be a relative url's problem. That would be terrible becouse I won't know the complete path to the catalog's images.
Post edited by: el_itur, at: 2006/07/19 20:02
Well the question was becouse ireport is giving me a error while testing with blank datasource. It tells me that there's no image.
I realize that it happens even with the images I set in design time. for example: "../logo/logo.jpg".
It's shown correctly on design time but on testing iReport gives me this error.
net.sf.jasperreports.engine.JRException: Image not found : ../logo/logo.jpg
could it be a relative url's problem. That would be terrible becouse I won't know the complete path to the catalog's images.
Post edited by: el_itur, at: 2006/07/19 20:02
Posted on July 20, 2006 at 4:54pm
JasperReports does not support relative paths, iReport yes.
JasperReports accepts absolute paths and it looks for a resource on file system first, then in the classpath, so if your images are in the classpath, you can simply refer to them with the name.
An alternative is storing the path in a parameter to have expressions like:
$P{IMAGES_DIR} + "/" + $F{IMAGE_FILE}
Giulio
JasperReports accepts absolute paths and it looks for a resource on file system first, then in the classpath, so if your images are in the classpath, you can simply refer to them with the name.
An alternative is storing the path in a parameter to have expressions like:
$P{IMAGES_DIR} + "/" + $F{IMAGE_FILE}
Giulio