Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Overview of this book

Table of Contents (20 chapters)
JDBC 4.0 and Oracle JDeveloper for J2EE Development
Credits
About the Author
About the Reviewer
Preface

Chapter 12. Creating a Report with JasperReports

JasperReports is a Java reporting tool to prepare reports for presentation. A JasperReports report is an HTML, PDF, Excel XLS, CSV, or a XML report. The data for a JasperReports report is static data or is data retrieved from a database table with an SQL query. JasperReports is designed to be included in Java/J2EE applications to generate dynamic presentation reports.

In this chapter, we will create JasperReports reports in JDeveloper. JasperReports uses JDBC to connect to database and retrieve data for a JasperReports report. A JDBC connection with the Oracle database 10g is established in the JasperReports configuration file (.xml file). We will create a PDF report and an Excel spreadsheet report using JasperReports. In this chapter we will learn the following:

  • Create a PDF Report with JasperReports

  • Create a Excel Spreadsheet with JasperReports

Setting the Environment

Download the open-source JasperReports tool JAR file jasperreports-2.0.5.jar...