JasperReport

Download Report

Transcript JasperReport

Overview of JasperReport
Dec 27, 2007
1
Current Reporting Library
• iText for PDF report generation
• iText is a powerful PDF generation engine
• How can we design/deliver a report with iText?
– Write Java code directly calling iText library
– The code need handling layout, style and so on
• Concerns
– Code duplication
– Customization, localization, and internationalization
2
JasperReport (1)
•
•
•
•
Build over iText to generate PDF report
Store a report template as XML format
Supported by a report designer, iReport
Benefits
–
–
–
–
Eliminate an amount of Java code
Ease the report design and testing
Improve the maintainability and reusability
Highly configurable (L10N and I18N)
3
JasperReport (2)
Data
Template
Java Code
JasperReport
PDF
Excel
HTML
4
JasperReport (3)
• Support multiple data sources
–
–
–
–
Database connection
Embedded SQL statement
Java Collections (Collection, Array and Map)
JDBC result set
• Support multiple report formats
– PDF, XLS, CSV, HTML, XML, RTF, ODT, TXT
5
JasperReport (4)
• Learning Curve
– Not very hard to learn
– Especially for the programmer who has experience in Java
Swing or JSP
– Good documentation online and a few books on market
• Requirements
• Disadvantages
– Lose flexibility comparing to directly coding over iText
– Report designer may still make beginners confused thought it
is good
6
JasperReport (5)
•
•
•
•
•
•
Open source Java reporting library
Under the Lesser GNU Public License
(LGPL)
Since 2001
Backed by a company now, JasperSoft
2007 Duke’s Choice Award Winner
http://www.jasperforge.org/jaspersoft/opens
ource/business_intelligence/jasperreports/
7
Demo and Questions
8