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

chamberlain

Recommended Posts

Hi Jasper Experts,

I have an optimisation question regarding RTF reports generated by Jasper Reports. I have a relatively large report (120+ pages). These reports can be quite a bit larger.

On each page there is a company logo in the top right hand corner. Information is represented in tables built out of static text and text field elements with borders to represent the cells. This all looks great in the report previewer and when exported to PDF.

However, when I export to RTF the file size can be huge (24Mb or more). This causes Microsoft Word 2007 to crash when I try to open it. By overriding the JRRtfExporter class, I have disabled writing the cell borders to the RTF file and the size is reduced by 10Mbs. If I disable the graphics as well, my report shrinks down to less than 3Mb. However, this means the report no longer looks the same as the preview.

We require the company logo to be printed on each page. I have been looking through the RTF 1.6 specification (used by the JRRtfExporter class) and I have not found a good way to export the raw image data and simply refer to that data on each page. Currently our graphics data is exported for EVERY page, which is a huge waste of space in the final RTF file as each instance of this data represents the same graphic.

Does anybody have any good suggestions for optimising our report templates for RTF, or modifying the export routines so that we achieve a usable (i.e. as close to the preview as possible) result in reasonably sized  (i.e. non-Word crashing) report files? RTF is a popular format, as the file can be modified in Word outside of our application when circumstances require it.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...