Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
4,567 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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
A solution for Fortify Path Manipulation.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
Suggested Courses

877 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