Jump to content
We've recently updated our Privacy Statement, available here ×
  • Discrepancy In Report XLS Output Cell Background Color Using JasperReports Server Web Services Call


    Tom C
    • Features: Exporters, Web Services Version: v4.2 Product: JasperReports® Server

    Symptom

    When exporting a report to XLS output using a web services call in JasperReports Server v4.2,  the user sees the report cell background color not matching the color as designed. Other report format outputs do not have this issue.

    Report created in JasperReports Server web UI in HTML output:

    html.png.115711def64e726de5f3af582da1ffa6.png

    Report exported through JasperReports Server web UI in PDF format:

    pdf.png.f4eb9db9c23b714518652a8a20743b96.png

    Report exported through JasperReports Server web UI in XLS format:

    xls.png.02e152156f2f56cd2c5f2405f48af40b.png

    Report exported using JasperReports Server Web Services requests in PDF format:

    pdf-ws.png.27bc7176c29dae494bf65e27c347800d.png

    Report exported using JasperReports Server Web Services requests in XLS format where the cell background color discrepancy is evidenced:

    xls-ws.png.8350a3698a6975bf053962dafeb937ef.png


    Cause

    JasperReports Server configures JExcelApiExporter to use custom palette to populate report output with the exact report colors. This affects all report unit executions in server users sessions. However, web services requests and scheduler job executions do not use custom palette for color mapping by default, thus users will observe the color discrepancies because of color approximation based on default XLS 256 colors palette.

     


    Solution

     Users can enforce the custom palette being used by XLS exporter for all report executions regardless its initiation origins. To do this, edit WEB-INFclassesjasperreports.properties file and add the following property setting:

    net.sf.jasperreports.export.xls.create.custom.palette=true
    

    Save the change and restart server to make this setting take effect.


    TTC-20130809


    User Feedback

    Recommended Comments

    There are no comments to display.



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