showing chart with Birt RE API [message #1063004] |
Tue, 11 June 2013 17:39 |
nari noori Messages: 33 Registered: November 2012 |
Member |
|
|
I am using BIRT RE API to generate a html report with chart. I am running birt in my custom web application on a tomcat server, and i have a apache web server in front.
I have problems getting my heading around how to show the chart. What is the easiest/best practive way to show the chart image in the report ?
cant understand how to use and set base image url and imagedirectory on htmlrenderoption?
this example code under shows the report but not the chart....is there any documentation or easy example ?
IReportRunnable runnable = reportEngine.openReportDesign(rptdesign);
IRunAndRenderTask runAndRenderTask = reportEngine.createRunAndRenderTask(runnable);
runAndRenderTask.setParameterValues(discoverAndSetParameters(runnable, request, reportEngine));
HTMLRenderOption htmlRenderOption = new HTMLRenderOption();
htmlRenderOption.setOutputFormat(format);
htmlRenderOption.setOutputStream(response.getOutputStream());
htmlRenderOption.setSupportedImageFormats("PNG;GIF;JPG;BMP;SWF;SVG");
//htmlRenderOption.setImageHandler(new HTMLServerImageHandler());
//htmlRenderOption.setBaseImageURL(request.getContextPath() + "/images");
//htmlRenderOption.setImageDirectory(sc.getRealPath("/images"));
[Updated on: Tue, 11 June 2013 17:43] Report message to a moderator
|
|
|
|
Re: showing chart with Birt RE API [message #1063046 is a reply to message #1063004] |
Tue, 11 June 2013 21:30 |
|
Where do you define sc? Do you have this above in your code?
ServletContext sc = request.getSession().getServletContext();
If so, that looks right. You could always test with a static location for the image directory, like:
options.setBaseImageURL("images");
options.setImageDirectory("E:/JBoss/jboss-as-7.1.1.Final/standalone/deployments/JSF_JBoss.war/images");
EDIT: Oops, had this post open before Kris answered, so I didn't see he had responded.
Michael
Developer Evangelist, Silanis
[Updated on: Tue, 11 June 2013 21:32] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03154 seconds