johnbor Posted January 14, 2010 Share Posted January 14, 2010 Hi, when i run the attached code, i've got an empty odt file, it contains just the borders of frames, but even the static texts don't appear, and the page numbers are not in the good format ( actual page/all page -> actual page ). Why is that? If I try it in pdf - works fine( report compile OK and the program runs without error ). The build path contains : - IText 2.1.0.jar, POI-3.2-final.jar, jasperreports-3.7.0.jar.Thx in advance!-JCode:InputStream input = new FileInputStream(new File("d:/temp/report.jrxml"));JasperDesign design = JRXmlLoader.load(input);JasperReport report = JasperCompileManager.compileReport(design);JasperPrint print = JasperFillManager.fillReport(report, additionalProp, new RosieObjects(vvv1));// JasperExportManager.exportReportToPdfStream(print, os);JRAbstractExporter exporter = getJasperExporter(ExportFormat.ODT);exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);OutputStream output = new FileOutputStream(new File("d:/temp/catalog." + ExportFormat.ODT.name()));exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, output);exporter.exportReport();output.close(); Link to comment Share on other sites More sharing options...
lshannon Posted January 14, 2010 Share Posted January 14, 2010 I have never worked with this exporter, however I know that some exporters (like html) will produce strange results like this if there are elements overlapping.For a small experiment perhaps reduce the elements of your report till you have a very simple report (perhaps just writing out one field). Test that to see if you have the sample result. Also perhaps try an HTML export, if that contains blanks then you might have some over lap.Again I have not worked with the ODT exporter so this is purely a guess.Good luck. Link to comment Share on other sites More sharing options...
johnbor Posted January 15, 2010 Author Share Posted January 15, 2010 Yes, you're definitely right - tried one static field without frames ( pdf,html too ), it works, but I need frames, and "complex" structure ( fields in frames ) You can see in the attached file - it's kind of a messy thing, after export. I'll try to fix the overlapping, tnx the idea!Have a nice day! 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