Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Relative path of images in HTML report
kankane
Hi,
I am new to birt report tool and I have one query.
I am generating html report which includes charts and tables in it. The generated report I have to sent as mail attachment as well as user able to download it from UI. Because of that I am not able to use url approach for accessing chart images in html.
I am using jboss 4.2.3 server which is running on Unix environment and I am unable to put report engine code and image path in web part of that project because of some project constraint so I am putting it inside back end EJB code. Below is my code snip.
HTMLRenderOption htmlOptions = new HTMLRenderOption();
htmlOptions.setImageDirectory("/tmp/NewImages");
htmlOptions.setOutputFileName("/tmp/SummaryReoprt.html");
In generated html the chart image path is like below
src="/tmp/NewImages/custom2.svg"
Once I will copy the generated html and image folder in my windows environment only tables are displayed and charts are not displayed because that path doesn't exist in windows environment.
But if I change the code like below it work fine because of relative path but it will generate the html file and images under bin directory of the jboss server from where I am copying it to my windows.
HTMLRenderOption htmlOptions = new HTMLRenderOption();
htmlOptions.setImageDirectory("NewImages");
htmlOptions.setOutputFileName("SummaryReoprt.html");
In html the chart image path is relative like below. And my generated html is on the same folder where images folder is created. So reports opens perfectly.
src="NewImages/custom2.svg"
But jboss bin directory is not the right place so I have to give a path of tmp directory or some else directory.
Could you please tell me how to handle about situation so that path will be created like above in generated html but I am able to give different path in setImageDirectory method so that it will not create in bin directory of jboss.
Thanks in advance.
Thanks,
Sachin
Find more posts tagged with
Comments
kankane
Could some one please answer this query.
Thanks,
Sachin
kankane
Hi,
Could some one please reply on above mention question. This is really very urgent.
Thanks,
Sachin