Jump to content
Changes to the Jaspersoft community edition download ×

How to attach an image to the Excel printed header/footer


Recommended Posts

We are using JasperReports library (version 4.5.1) to export our reports as Excel 2007 (XLSX format) files.

A new requirement came in: add an image (logo) to the header or footer section of the Excel sheet (In Excel application one could do that by opening the print preview, then opening the Page Setup dialog, Header/Footer tab and then choosing Custom Header or Footer.)

My question is two-fold:

1. Where to add the image in the *.jrxml file so that the image (in the generated Excel) will only be visible when the user opens the print preview (or prints) from Excel?

2. If it is not possible to insert the image in the Jasper report at design time, is there an API available to do some sort of post-processing and modify the JasperPrint object (via the JRXlsxExporter or perhaps JRExcelApiExporter) and insert the image as a custom header/footer of the sheet?


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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