a_paturi Posted February 1, 2007 Share Posted February 1, 2007 I created a report and it displays correctly in PDF. When I am exporting the report to HTML i am having 2 issues. 1. When I export to HTML using "exportReportToHtmlFile " the layout of the report is not spread out like PDF. The report occupies the whole page in PDF but in HTML the report occupies only 50% of the page (center of the page) 2. When I try to ouput the report to browser directly the report contains blank images and does not display correctly. I am attaching the displays in a zipped word document Code i am using to display in browser: PrintWriter out = response.getWriter(); JRHtmlExporter exporter = new JRHtmlExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jPrint); exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out); exporter.exportReport(); [file name=rpt_query.zip size=160064]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/rpt_query.zip[/file]Post edited by: a_paturi, at: 2007/01/31 21:49 Link to comment Share on other sites More sharing options...
a_paturi Posted February 1, 2007 Author Share Posted February 1, 2007 I could fix the issue # 2. But i still have problem with 1. I had to pass another parameter to the exportReport. exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, new Boolean(false)); Link to comment Share on other sites More sharing options...
sphillips Posted February 7, 2007 Share Posted February 7, 2007 Anu, With respect to issue #1, if you have the report contained within a table on your HTML page, check to make sure that the table's width is not being set to 100% or some other number. The width of the report is specified within the properties for the report based on the size of the layout or page style that you select. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now