Jump to content
Changes to the Jaspersoft community edition download ×

Image not visible on HTML report


vivekmuddasani

Recommended Posts

Hi, We are using jasperserver 4.5. Jasperserver webapp is running in our tomcat as separate application. We use RESTful API calls to create/schedule/fetch/delete reports. Here is the issue we are facing:

  • When we run a report from another application using RESTful API and try to fetch the report output from another appliation using RESTful API, the PDF format shows the Image/Logo, while the html format shows blank at the image location. Both PDF and HTML show rest of the data perfectly.
    • Strangely when i open the same report output by logging in to jasperserver web GUI, i see the logo on PDF and HTML.

This makes me believe that the RESTful API call is unable to fetch the image. We are fetching the response body as stream where we are using httpclient to make the RESTful API call. The URI we use is:  http://${reports.server}/jasperserver/fileview/fileview/ + reportUri. Still not able to figure out the issue. I have seen lot of people complaining about spring being the culprit here but couldn't ascertain the same. 

Can anybody suggest what the problem is and how i can overcome it.

Thanks,

VM.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Are you using rest or rest_v2 interface?   If rest_v2, does it work OK if you run the report by just hitting the report URI via the browser?   If so, take a look at the trace in your tomcat localhost_access log -- IIRC, a browser does a GET for the main report, then additional GETs for each image in the report.   I'd assume you'd want to do the same in your application.

Link to comment
Share on other sites

We are using rest and not rest_v2. When i checked the image url using firebug, i see that the image name is referred to as img_x_x and not the image name that is in the repository.

 

We are grabbing the response from rest call as byte stream and displaying it on HTML page. How would i know what the url of the image is from the byte stream response.

 

Link to comment
Share on other sites

I have exactly the same problem and I am using rest_V2. The report works fine but images not visible. When I look with firebug, image url refers to a rest resource in jasperserver, but this resource doesn't work even when I try from jasperserver !!

 

KGZ

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

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