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)
Blank reports
paddhu
Hi,
Is there any reson why RE API generates blank reports?
no problem with the HTML reports but if i generate the pdf, i will get all the blank pages and there is no exceptions as well.
It is not complicated report, i am jsut selecting all the rows from the table and the table has data.
I am using tomcat 5.5 server, generating the reports in JSF button handler.
I am new to this API, any help is appreciated.
Best Regards,
paddhu.
Find more posts tagged with
Comments
JasonW
Paddhu,
Are you using the PDFRender option class?
Jason
paddhu
Hi Jason,
I was using HTMLRenderOption.class, i chaged the code to use PDFRenderOption class. now the code looks as below.
the generated pdf has 4 pages but all are empty.
i believe pdf has data but not showing up...... some problem with the pdf generated, i suppose. I am attaching the pdf for your reference.
<code>
PDFRenderOption options = new PDFRenderOption();
options.setImageHandler(new HTMLServerImageHandler());
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_PDF);
options.setOutputStream(resp.getOutputStream());
task.setRenderOption(options);
// run report
task.run();
task.close();
</code>
Best Regards,
Paddhu.
paddhu
They above issue is fixed........
This information may help people who are using BIRT reports in the JSF.
Apart from all the code to generate reports.
please add the below two lines at the end.
response.getOutputStream().flush();
FacesContext.getCurrentInstance().responseComplete();
because of the obvious reasons... or elase you will end up generating blank reports.
hope this helps.
Best Regards,
Paddhu
JasonW
Paddhu,
Good to hear(read). Did you not have to set the content type:
PDFRenderOption options = new PDFRenderOption();
options.setOutputFormat("pdf");
response.setHeader("Content-Disposition", "inline; filename="test.pdf"" );
response.setContentType( "application/pdf" );
options.setOutputStream(response.getOutputStream());
Jason