Tag Archives: JasperServer

JasperReport Excel Options

Over the past year I have been learning about so many different OpenSource packages it isn’t even funny.  One thing that is available for free, but also has a paid version (which we at using at UniTek Global Services), is JasperServer.  Right now we are on version 4.2.1.  When we first rolled it out, everything seemed to work excellently with the exception of three things:

  1. In the report template, I placed the company logo to the left of two rows:  the report title and the description/generation date.  Whenever I generated the report as an XLS via Jaspersoft iReport Designer, the image would load correctly.  On the other hand, whenever I generated the report as an XLS via the JasperServer, the space for the image was left there without an image.
  2. Once the image issue was resolved (I will describe how soon), the XLS generated via the JasperServer would load the image on the same row as the title but it wouldn’t extend into the cell directly below so that it would appear to the left of the description as well.
  3. XLS reports generated via the JasperServer were not showing borders on any of the cells no matter how large I made the borders in the designer.

If you encounter these issues in your JasperReport template, do the following:

  1. In the Report Inspector pane, click on the top-most element (which is the template).
  2. In the Properties pan, select the Properties row and then select the elipsis at the right of the row.
  3. Show Images In XLS:
    To ensure that images will appear when exported as XLS, do the following:
    1. Click the Add button in the Properties window.
    2. Enter the following as the Property name:
      net.sf.jasperreports.export.xls.ignore.graphics
    3. Enter the following as the Property value:
      false
    4. Click OK to close the Add/modify property window.
  4. Allow Cells To Span Multiple Rows In XLS:
    To ensure that cells can span multiple rows when exported as XLS, do the following:
    1. Click the Add button in the Properties window.
    2. Enter the following as the Property name:
      net.sf.jasperreports.export.xls.collapse.row.span
    3. Enter the following as the Property value:
      false
    4. Click OK to close the Add/modify property window.
  5. Show Borders In XLS:
    To ensure that images will appear when exported as XLS, do the following:
    1. Click the Add button in the Properties window.
    2. Enter the following as the Property name:
      net.sf.jasperreports.export.xls.ignore.cell.border
    3. Enter the following as the Property value:
      false
    4. Click OK to close the Add/modify property window.