2005 IR Help Posted August 26, 2006 Share Posted August 26, 2006 By: Netto - rcnetto PDF is ok, but no data when exporting to HTML 2004-05-19 08:07 I have a report produced with iReport 0.2.3. When exporting to pdf through a servlet, the report is correctly generated and I can see all the data. Trying to export the same jasper report to html format, no data is displayed, but I notice the labels are shown in a number equal to the amount of lines the report should have... Here is the code I use: <code> ServletContext context = this.getServletConfig().getServletContext(); // compiled jasper report File reportFile = new File(context.getRealPath("/cc.jasper")); // (...) // all the variables used are setted (con, format, params) if (format.equalsIgnoreCase("html")) { response.setContentType("text/html"); PrintWriter out = response.getWriter(); JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath()); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, params, con); JRHtmlExporter exporter = new JRHtmlExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out); Map imagesMap = new HashMap(); request.getSession().setAttribute("IMAGES_MAP", imagesMap); exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "image?image="); exporter.exportReport(); } else if (desc_formato.equalsIgnoreCase("pdf")) { // pdf works fine } </code> Maybe the following post has something about it (http://sourceforge.net/forum/message.php?msg_id=2010711), but I couldn't understand what Teodor meant with "Try to make you text elements a little taller." Make its height bigger? That's it... Netto By: supportsib - supportsib RE: PDF is ok, but no data when exporting to HTML 2004-05-20 03:21 Ii think your repport fileds has overlapped. check it By: Rupesh - rupeshpatodi RE: PDF is ok, but no data when exporting to 2004-05-24 23:29 i am also geting the same problem i have checked the report fileds they are not over lap and in print privew the ilines are not showing and the next page start the same page 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