Solved

How to create a report using iReport, set bold for some words in TextField and exports to PDF using jasper reports?

Posted on 2010-08-20
6
4,323 Views
Last Modified: 2013-12-15
Hello,

I'm using iReport 3.5.2, jasperreports-3.5.2.jar, iText-2.1.0.jar in my application. When I'm using the iReport, the report shows ok, with bold in some words. But when I'm exporting to PDF in my application, the words appear without bold.

What's the problem?

I'm sending the report attached.

Thanks a lot.  Ato028.txt
0
Comment
Question by:arthur_info
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 6

Expert Comment

by:__geof__
ID: 33509237
How do you export to PDF, it is probably the cause of the error.
0
 
LVL 1

Author Comment

by:arthur_info
ID: 33509910
Well... It's a big routine... It's attached in 2 files, the "Report.zip" that has the routine to generate the report and "Source.zip" that it's a sample of use of the jar created by "Report.zip". But searching here I think that is missing some library... Somebody knows something about this?

Thanks a lot...
Source.zip
report.zip
0
 
LVL 13

Expert Comment

by:Murali Murugesan
ID: 33538781
check the following,

1. IText version used by ireport and your application.
2. Check whether the font you apply for PDF export is reflected correctly from your application.

-Murali*

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:arthur_info
ID: 33557626
iText: 2.1.0. The fonts are correct, I think. I'm sending the screens attached.

Thanks...
Library.jpg
0
 
LVL 1

Author Comment

by:arthur_info
ID: 33557640
Sending other printscreens...
Designer.jpg
Preview.jpg
0
 
LVL 1

Accepted Solution

by:
arthur_info earned 0 total points
ID: 33567113
I discovered the answer...

I need to put "<style isBold=\"true\" fontSize=\"12\" pdfFontName=\"Helvetica-Bold\">$F{FIELD}</style>"

and not "<style isBold=\"true\" fontSize=\"12\"\">$F{FIELD}</style>

This way works fine.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Tomcat: Unable to run tomcat service. 2 29
jsp error 6 45
Netbeans and org.apache.commons.lang3 issue 3 24
How to log java errors in tomcat 8 24
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question