Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Image not showing in report(???)
DButtery
Hi all,
What is the trick to getting an image to display in a report being served by a app servlet?? I have tried both embedded and referenced images and cannot get the image to be displayed in the report in the browser...
Any clues?
Thanks,
-Dennis
Find more posts tagged with
Comments
JasonW
Dennis,
Can you check your server to see if any temp images are being created?
Also post the href for the image by using the /preview mapping instead of /frameset.
DButtery
I have been able to get the embedded images going... But... That's not the end-solution that I wanted.
The obvious goal is to have a shared resource folder containing all of the app images and have all of the report designs reference them from that location.
When I look at the href of the images it appears that the actual filename is being replaced with a series of alphanumeric characters...
-Dennis
DButtery
After looking a little further...
There seems to be a mismatch between how I reference my images in my developement enviroment vs. how they are referenced when I deploy the report design to my servlet environment.
How I do get these two in sync?
-Dennis
DButtery
Can someone please explain this?<br />
<br />
Apparently the following code does absolutely nothing...<br />
<br />
HTMLRenderOption options = new HTMLRenderOption();<br />
options.setImageHandler(new HTMLServerImageHandler());<br />
options.setBaseImageURL(req.getContextPath()+"/images");<br />
options.setImageDirectory(sc.getRealPath("/images"));<br />
<br />
I have my servlet hierarchy setup exactly as is shown in <a class='bbc_url' href='
http://wiki.eclipse.org/Servlet_Example_(BIRT)_2.1'>Servlet
Example (BIRT) 2.1 - Eclipsepedia</a><br />
<br />
In my servlet enviroment I have placed my 'shared' images in the images folder and my report designs in the 'reports' folder.<br />
<br />
<br />
In my development environment I have mimiced the same hierarchy. When I place an image in a report design I reference it out of the images folder. Shows up just fine! When then deploy that report design to my servlet environment and request the report ... No image!<br />
<br />
<br />
My server console shows that I am getting FileNotFoundException on the image file when the HTMLServerImageHandler is trying to access it ...<br />
<br />
What is the magic incantation to get this to work???? <br />
<br />
Thanks,<br />
-Dennis
JasonW
options.setBaseImageURL(req.getContextPath()+"/images");
options.setImageDirectory(sc.getRealPath("/images"));
The imagedirectory is where server creates the images and the base image url is prepended to the image name when the report is rendered. For this to work verify that you are using a PlatformServletContext.