saman0suke Posted May 25, 2011 Share Posted May 25, 2011 I'm converting a report that I created it on iReport 3.7.6, in Excel format, it shows the information, numbers etc,but the design is completely disordered, there are missing lines, some texts does not appear, so here's the code: jasperPrint = JasperFillManager.fillReport("C:/ProyectoEdmundo/EID/EID/public_html/verified_account/1/verifiedAccountRep.jasper", parameters, conn); xlsFileName = "report.xls"; byteArrayOutputStream = new ByteArrayOutputStream(); exporterXLS = new JRXlsExporter(); exporterXLS.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporterXLS.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, xlsFileName); exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE); exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, byteArrayOutputStream); exporterXLS.exportReport(); response.setContentType ("application/vnd.ms-excel"); response.setHeader ("Content-Disposition", "attachment;filename=\"" + xlsFileName + "\""); ouputStream = response.getOutputStream(); ouputStream.write(byteArrayOutputStream.toByteArray()); ouputStream.flush(); ouputStream.close(); byteArrayOutputStream.flush(); byteArrayOutputStream.close();Is there anything I can do to get exactly the same report? the original report is filled with at least 5 subreports by the way, any help would be appreciated, thanks!!! Link to comment Share on other sites More sharing options...
saman0suke Posted May 26, 2011 Author Share Posted May 26, 2011 I know what the problem is, I was testing it on iReport, and it seems that when an element is "touching" another element, they cannot being displayed on excel format, maybe because if an element is over another one, would be like a cell over another cell in the excel format, is there something that I can do, as a programming code to avoid this at the moment of the export? because the solution would be redesign the report in order to avoid putting elements over the other ones but that would be really difficult since the report is really huge, any idea¡? thanks 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