Jump to content
We've recently updated our Privacy Statement, available here ×

ODT report is empty


johnbor

Recommended Posts

 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!

-J

Code:
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

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...