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)
Problems with images from shared resources in PDF output
ziploide
Hi everyone!<br />
<br />
Like most of the folks here, I'm pretty new to BIRT but have been playing with if for the past few weeks.<br />
<br />
I've managed to make awesome reports so easily and in a blink of an eye.<br />
<br />
My problems is that reports that I try to generate in PDF format seem to have problems to output the images (Haven't tried charts yet...)<br />
<br />
Every time I try to output a PDF report featuring a JPG image, instead of it there's a text saying "Current report item is not supported in this report format." If I use an embedded image the resulting report is normal, but I need the images to be from a shared resource.<br />
<br />
This is the configuration of my PDFRenderOption (By the way, I'm using a Servlet whose only purpose is to print the report. It is to be deployed to a Weblogin 9.2 Server. Everything works awesome but the images):<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
...
design = birtReportEngine.openReportDesign( sc.getResource("/Reports/"+reportName+".rptdesign").toString().substring(6) );
//create task to run and render report
IRunAndRenderTask task = birtReportEngine.createRunAndRenderTask( design );
task.getAppContext().put("BIRT_VIEWER_HTTPSERVLET_REQUEST", req);
PDFRenderOption options = new PDFRenderOption();
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_PDF);
resp.setHeader( "Content-Disposition", "inline; filename=""+reportName+".pdf"" );
options.setOutputStream(resp.getOutputStream());
options.setImageHandler(new HTMLServerImageHandler());
task.setRenderOption(options);
//run report
task.run();
task.close();
...
</pre>
<br />
Everything, Images, Report designs is in the WebContent Folder. Images are in WebContent/Images and report designs are in WebContent/Reports.<br />
<br />
Hope anyone helps me out with this.
Find more posts tagged with
Comments
There are no comments yet