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

labels not appearing on charts exported to PDF


bhlevca

Recommended Posts

 Hi,

 

I had an old project  using  JasperReports 2.0.4.  Everything was appearing fine. I have a customizer class for the chart. 

I upgraded to 2.0.5 and now at 3.7.1.   The charts look fine, however, there are no labels showing up for values, charts legends etc.

Beside the jasper reports jar there are changes also at the java version.   I am using OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode) on a Linux platform.

I don't know how to debug this issue  to get the labels printed. 

Any help would be appreciated. Thank you.

 

Bogdan

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

I solved the problem. It appears that moving to the new platform also meant moving from Sun's JDK to Open-JDK. Open JDK is lacking the fonts supplied by Sun's JDK.
Removing Open JDK and replacing it with Sun's JDK 6-u16 made the fonts in the charts magically appear. I did not have time to investigate how jcharts is using those fonts, but if anyone has the knowledge I'd be happy to hear.

Bogdan



Post Edited by bhlevca at 04/10/2010 20:30
Link to comment
Share on other sites

Hi,

 

You would need to upgrade to a newer version of JasperReports and make use of font extension support to make sure your fonts will be available no matter where you deploy the application.

Basically, you would be wrapping up TTF files in special configured JARs that you put the in application classpath.

I hope this helps.
Teodor

 

Link to comment
Share on other sites

Thanks Teodor,

I think I am already using the latest JR release 3.7.1. Now that I have changed the JDK it woks fine. However, I am interested in general applicable solution.


Is it possible to get a link to a document which describes how to build such a special jar and how to use it?

Thanks again,
Bogdan



Post Edited by bhlevca at 04/13/2010 18:03



Post Edited by bhlevca at 04/13/2010 18:04
Link to comment
Share on other sites

  • 3 months later...

We have experienced the same issue. However, it appears to be an issue with at least  the 3.7.* release.

We have been running 3.0.0 on OpenJDK and it works fine when generating PDFs.

However when generating the IDENTICAL JRXML in 3.7.3 or 3.7.4 the text in charts does not appear.

NOTE::

  - this is run on the same machine with the same JRXML and OpenJDK but a different Jasper version.

  - exporting the same report as HTML or any other format works fine - the chart labels are visible

Since it works in 3.0.0 the assumption is that either the way JFree is instantiated from Jasper has changed or some configuration setting that passed information to JFree about where to find the fonts to use has changed.

We are busy trying to debug this but if anyone has any idea how the font location is passed to JFree it would be appreicated.



Post Edited by uhurusurfa at 08/05/2010 13:09
Link to comment
Share on other sites

 I had the same issue with PDF and I tried re-sizing my chart in iReports and it fixed the issue.  My chart was filling the entire band from left to right and top to bottom, just made it a little smaller and the PDF's started working.  This was in JasperServer 3.7.0 community release, not in iReports.  Everything worked fine in iReports preview.

Link to comment
Share on other sites

  • 3 years later...

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