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,170 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
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 …

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now