Jump to content
Changes to the Jaspersoft community edition download ×

How to create and use a reportFont ?

2004 IR Help

Recommended Posts

By: Philippe - phgaudin

How to create and use a reportFont ?

2005-01-27 06:09

I'm writing a compiler which translates a PowerBuilder datawindow in a JasperDesign.


To do this i use the classes in net.sf.jasperreports.engine.design to create a JasperDesign.


Then I compile it using jrCompiler.compileReport(jasperDesign);


Finally I save it to XML using JRXmlWriter.writeReport(jasperReport,destXMLFile,"ISO-8859-1");



I have a problem with the reportFonts.


I try to reuse a limited set of reportFonts created as JRDesignReportFont but when I save the XML file, all the textFileds use a specific font :


<textElement textAlignment="Right">

<font fontName="Arial" size="8" isBold="true" isItalic="false"/>



instead of a reportFont like :


<textElement textAlignment="Right">

<font reportFont="Arial8Bold"/>



BTW, the report font is created correctly :


<reportFont name="Arial8Bold" isDefault="false" fontName="Arial" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>


How should I create my JRDesignReportFont so that they reuse the report fonts ?


Thanks in advance !







By: Philippe - phgaudin

RE: How to create and use a reportFont ?

2005-02-07 05:38






By: vkat - vijayka

RE: How to create and use a reportFont ?

2005-02-07 21:19

The reports I am generating also have similar issue but due to other more urgent things I was not able to experiment with it. Any tips or hits are welcome.





By: Philippe - phgaudin

RE: How to create and use a reportFont ?

2005-02-15 00:00


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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