Jump to content
We've recently updated our Privacy Statement, available here ×

How I can show image on PDF report in WebApp on Server


dcdacd
Go to solution Solved by hozawa,

Recommended Posts

Hi, Im working in a web application and I have 1 problem. When I run my app in localhost, I can see the images on the report PDF but I run the application on the server, the images not show in.

I have tried various solutions, Insert the relative path of the image (in the same folder as the file jasper, jrxml) by setting the java class, but both without success.

Please someone knows some solution or knows of a manual to guide me ??

Thanks for all.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi, thanks for your answer, I said you:

I'm specifying in the report as:

imageExpression: "..\reports\minInterior.jpg"

 

I see in the report and when I run it too (preview) but now I dont see it when I run in localhost.

 

I have this cfg:

in xml file:

"..\forms\minInterior.jpg"

 

in design screen:

When the image is selected, in a:

image expression:"..\forms\minInterior.jpg"

Expression Class: java.lang.String

 

 

I m working in a intranet, I dont have connection to internet, sorry.

Link to comment
Share on other sites

Are you using JasperReports Server? If you are, Jaspersoft Studio will change the uri with header "repo:" to signify the image is in the JasperReports Server repository. If you're not, just upload an image and specify the uri to that image - a place where you can view the image from your web browser.

Link to comment
Share on other sites

No, Im not using JasperReports Server, I mount my appweb on a server.

I use the plugin jasperreports for Netbeans only, I'm sorry for causing confusion.

When I run the ireport in preview mode, I can see the image without problem, but I run the web aplication, I get a error, the image isn't show.

Im using a path relative, I put the image in the same directory of *.jasper and *.jrxml (in jpg format).

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...