Jaspersoft best practices on custom report item embedding
search cancel

Jaspersoft best practices on custom report item embedding

book

Article ID: 235223

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

After the Jaspersoft upgrade, you are noticing that the input control display on custom reports for embedded items is inconsistent, they do not display correctly or blank

What are the best practices on custom reports and embedding of input controls and images?

Environment

Release : Any

Resolution

Best practices to avoid any issues with input controls embedding:

  1. Not to embed any input controls
  2. Not to embed any images

Use the images the same way we are using them, add them to repository, so they are on the server and can be reused and corrected easily.

You should create a separate file for them and reference them, for example:

<image> <reportElement x="664" y="1" width="15" height="15" uuid="67184b08-2550-455e-a6d0-649b80047930"/> <imageExpression><![CDATA[$F{OVERALL_STATUS} == 0 ? "repo:/ca_ppm/resources/images/stoplightWhite" : $F{OVERALL_STATUS} < 40 ? "repo:/ca_ppm/resources/images/stoplightGreen" : $F{OVERALL_STATUS} < 90 ? "repo:/ca_ppm/resources/images/stoplightYellow" : "repo:/ca_ppm/resources/images/stoplightRed"]]></imageExpression> </image>

This is the way we get them from the repository (this is the KPI report).

Additional best practices:

For complex reports:

  1. Work on changing the xml in Studio and saving it locally.
  2. Then when done, upload it as JRXML directly on the server

Sometimes publishing causes problems with complex reports and this approach would avoid you from having to spend lots of time and cleaning up manually

For Jaspersoft Studio:

When republishing reports, make sure you set the option Always Ignore on JasperReports Server Settings page: 

If you already have embedded input controls/images that do not work after upgrade:

Currently the only way to fix the situation would be to correct manually and then try to rework the reports to follow the best practices on avoiding embedding