Jump to content

image problem in IReport.


nikitha

Recommended Posts

Hi,

I have a requirement to place an image in the jasper report, using ireport tool, i have used the image tool in the ireport but, facing the problem while accessing the image.

The above problem is rectified, when i give the absoulte path of the image,  but facing the problem when it will be used in any web application.

Please help me, how exactly, i have to give the path of the image, so that it can access in any web application.

 

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I am not sure if this will help you or not but when I need to have an image on one of my reports I place the image file in the same directory as the Jasper file and then only give the name of image file in the image object.

If I had an image named myPicture.jpg and wanted to have that on my report, the image expression would be "myPicture.jpg" with no path.

I do the same thing with sub-reports and it has always worked out well for me.

Link to comment
Share on other sites

Hi,

When you say that you can't access the image, in what way are you having problems?

I'm using a parameter in my reports that are of the class type java.io.InputStream. That parameter ($P{imageInputStream}) is then used as the image expression and the Image Expression Class is set to java.io.InputStream.

One issue I ran into was that the Using Cache flag needed to be checked, otherwise the image would not be displayed more than once in the report.

Hope this helps you somewhat,

Magnus



Post Edited by Magnus Fiore Palm at 01/22/09 17:24
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...