berlim Posted August 25, 2007 Share Posted August 25, 2007 Hi, I am not sure if I found a bug or if what I am doing is just not allowed. I would like to add an image to my jrxml, but there is no way to embed the image in the template. Thus, I created a folder called images that will stay in the same folder where all the tmeplates are located. Then, I put the location of the image asimages image.jpg (The backslashes aren't appearing for some reason, so they are located where the spaces are) This works fine on iReport and the pdf I am creating compiles correctly, but when I run the java code to compile the pdf, it says that the image cannot be located. Does anyone know of any way to get this images folder to work, or another way around it. The reason I am doing this is because I don't want the tempalte to have to know the exact location of the images, just where they are in relation to the templates. Thanks, any help is appreciated. Post edited by: berlim, at: 2007/08/24 17:47 Post edited by: berlim, at: 2007/08/24 17:48Post edited by: berlim, at: 2007/08/24 17:48 Link to comment Share on other sites More sharing options...
berlim Posted August 27, 2007 Author Share Posted August 27, 2007 Does anyone have any ideas for this? Link to comment Share on other sites More sharing options...
csbac Posted August 28, 2007 Share Posted August 28, 2007 Hi!Maybe the problem is with the 'current directory' ..."but when I run the java code to compile the pdf"-> in which directory is this application run?The images/image.jpg is probably relative to the current directory of the application, not the directory where the .jasper file is located. Hope this helps a bit,Sebastian Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now