You are previewing JasperReports for Java Developers.
O'Reilly logo
JasperReports for Java Developers

Book Description

Create, Design, Format and Export Reports with the world's most popular Java reporting library

  • Get started with JasperReports, and develop the skills to get the most from it

  • Create, design, format, and export reports

  • Generate report data from a wide range of datasources

  • Integrate Jasper Reports with Spring, Hibernate, Java Server Faces, or Struts

In Detail

JasperReports is the world's most popular embeddable Java open source reporting library, providing Java developers with the power to easily create rich print and web reports. This book shows you exactly how to get started, and develop the skills to get the most from JasperReports.

The book steers you through each point of report setup, to creating, designing, formatting, and exporting reports with data from a wide range of datasources, and integrating JasperReports with other Java frameworks.

Starting with the basics of adding reporting capabilities to your application, and creating report templates you will first see how to produce your reports through the use of JRXML files, custom ANT targets, and then see preview them in both the browser and the native browser of JasperReports.

Getting data into your reports is the next step, and you will see how to get data from a range of datasources, not only databases, but XML files, and Java Objects, among others.

You will create better looking reports with formatting and grouping, as well as adding graphical elements to the report. You will export your reports to a range of different formats, including PDF and XML.

Creating reports will be made even easier with a walkthrough of the iReport Designer visual designing tool. To round things off, you will see how to integrate your reports with other Java frameworks, using Spring or Hibernate to get data for the report, and Java Server Faces or Struts for presenting the report.

Concise, practical guidance introduces you to JasperReports, and gets you creating complex and elegant reports

Visit the Free Online Edition for JasperReports for Java Developers and learn more about the book and discover what each chapter from this book has in store.

http://jasperreportsbook.packtpub.com

Table of Contents

  1. Copyright
  2. Credits
  3. About the Author
  4. Preface
  5. An Overview of JasperReports
    1. Brief History of JasperReports
    2. What is JasperReports?
    3. The JasperReports Open-Source License
    4. Features of JasperReports
    5. Class Library Dependencies
    6. Typical Workflow
    7. Where to Get Help?
    8. Summary
  6. Adding Reporting Capabilities to Java Applications
    1. Downloading JasperReports
    2. JasperReports Class Library
    3. Summary
  7. Creating Your First Report
    1. Creating a JRXML Report Template
    2. Generating the Report
    3. Displaying Reports on a Web Browser
    4. Elements of a JRXML Report Template
    5. Summary
  8. Creating Dynamic Database Reports
    1. Database for Our Reports
    2. Generating Database Reports
    3. Summary
  9. Working with Other Datasources
    1. Empty Datasources
    2. Map Datasources
    3. Java Objects as Datasources
    4. TableModels as Datasources
    5. XML as Datasource
    6. Custom Datasources
    7. Summary
  10. Report Layout and Design
    1. Controlling Report-Wide Layout Properties
    2. Setting Text Properties
    3. Setting a Report's Background
    4. Adding Multiple Columns to a Report
    5. Grouping Report Data
    6. Report Expressions
    7. Report Variables
    8. Stretching Text Fields to Accommodate Data
    9. Laying Out Report Elements
    10. Using the <frame> Element
    11. Hiding Repeated Values
    12. Subreports
    13. Summary
  11. Adding Charts and Graphics to Reports
    1. Adding Geometrical Shapes to a Report
    2. Adding Images to a Report
    3. Adding Charts to a Report
    4. Summary
  12. Other JasperReports Features
    1. Report Localization
    2. Scriptlets
    3. Crosstabs
    4. Subdatasets
    5. Adding Hyperlinks and Anchors to Reports
    6. Handling Very Large Reports
    7. Summary
  13. Exporting to Other Formats
    1. Exporting Overview
    2. Exporting to PDF
    3. Exporting to RTF
    4. Exporting to Excel
    5. Exporting to HTML
    6. Exporting to XML
    7. Exporting to CSV
    8. Exporting to Plain Text
    9. Directing HTML Reports to a Browser
    10. Summary
  14. Graphical Report Design with iReport
    1. Obtaining iReport
    2. Creating a Database Report in Record Time
    3. Creating a Report "From Scratch"
    4. Creating More Elaborate Reports
    5. Help and Support
    6. Summary
  15. Integrating JasperReports with other Frameworks
    1. Integrating JasperReports with Hibernate
    2. Integrating JasperReports with Spring
    3. Integrating JasperReports with JavaServer Faces
    4. Integrating JasperReports with Struts
    5. Summary
  16. Index