keogz Posted July 17, 2007 Share Posted July 17, 2007 My Jasper reports were originally PDF's and now i need them to be in HTML... my problem would be that when i display/view the html, the spacings in blank areas show as jpg files that wont load. i need to dispaly the html properly. i know this seems easy to fix but im not to verse with jasper reports and would like to know how to fix this....i use .jasper files and have iReport 2.0...would appreciate it if someone could give me the best solution. thank you! Link to comment Share on other sites More sharing options...
codyjasperForge Posted July 17, 2007 Share Posted July 17, 2007 Do you have your source .jrxml? Link to comment Share on other sites More sharing options...
keogz Posted July 18, 2007 Author Share Posted July 18, 2007 yes, i always create the jrxml file everytime in iReport..the thing is, i dont know how to configure the page to recognize the blank spaces as not a jpg to be displayed as html...could you help me with this? Link to comment Share on other sites More sharing options...
szaharia Posted July 18, 2007 Share Posted July 18, 2007 Hi, actually there is a specific html export parameter, JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, which tells the exporter how to fill empty cells in the generated html. If you set it to false, no more transparent pixel image will be loaded (or shouldn't be). hth,sanda Link to comment Share on other sites More sharing options...
keogz Posted July 19, 2007 Author Share Posted July 19, 2007 thank you...but i've already added this line exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, false); to my BaseReportAction.java and tried to generate the html page again..unfortunately, it still wont recognize the spaces... need help pls.. Link to comment Share on other sites More sharing options...
keogz Posted July 19, 2007 Author Share Posted July 19, 2007 my BaseReportAction.java includes the ff lines: final JasperPrint jasperPrint = JasperFillManager.fillReport( jasperReport, parameters, getTransactionManager().getDataSource().getConnection() ); request.getSession() .setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, jasperPrint); final JRHtmlExporter exporter = new JRHtmlExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); final StringBuffer sbuffer = new StringBuffer(4096); exporter.setParameter(JRExporterParameter.OUTPUT_STRING_BUFFER, sbuffer); exporter.setParameter(JRHtmlExporterParameter.HTML_HEADER, ""); exporter.setParameter(JRHtmlExporterParameter.HTML_FOOTER, ""); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "../../servlets/image?image="); exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, false); exporter.exportReport(); //log.debug(sbuffer.toString()); request.setAttribute("reportHTML", sbuffer.toString()); }Post edited by: keogz, at: 2007/07/19 02:57 Link to comment Share on other sites More sharing options...
kunkasurendra Posted July 24, 2007 Share Posted July 24, 2007 can i have your source .jrxml file? Link to comment Share on other sites More sharing options...
keogz Posted July 26, 2007 Author Share Posted July 26, 2007 here it is....one of my reports.. [file name=New_Player_Report.jrxml size=17380]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/New_Player_Report.jrxml[/file] 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