JasperReports 3.6 Development Cookbook


JasperReports 3.6 Development Cookbook
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$25.49
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
$49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Create, size, and position the titles, headers, footers, and body of your report using JasperReports and iReport
  • Enhance the look and feel of your report using background images, watermarks, and other such features
  • Create multi-page and multi-column reports using multiple types of data in the same report
  • Generate reports from Java Swing applications or from your web application
  • Part of Packt's Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible.

Book Details

Language : English
Paperback : 396 pages [ 235mm x 191mm ]
Release Date : July 2010
ISBN : 1849510768
ISBN 13 : 9781849510769
Author(s) : Bilal Siddiqui
Topics and Technologies : All Books, Big Data and Business Intelligence, Data, Cookbooks, Java, Open Source


Table of Contents

Preface
Chapter 1: Creating Static and Dynamic Titles and Headers
Chapter 2: Working with the Body and Footer of your Report
Chapter 3: Enhancing the Look and Feel of your Report
Chapter 4: Working with a Variety of Data Sources
Chapter 5: Multi-page Reports
Chapter 6: Multi-column Reports
Chapter 7: Summary Report, Crosstabs, and Graphs
Chapter 8: Java Wrappers for your JasperReports
Chapter 9: Using Mathematical and Logical Expressions
Index
  • Chapter 1: Creating Static and Dynamic Titles and Headers
    • Introduction
    • Downloading, installing, and running JasperReports and iReport
    • Creating your first "Hello World" report
    • Creating and sizing the title for your report
    • Using dynamic titles that can change during report processing
    • Inserting a company logo in the title of your report
    • Adding a simple header to your report
    • Setting margins for your report and aligning the report header relative to report margins
  • Chapter 2: Working with the Body and Footer of your Report
    • Introduction
    • Displaying a field along with its label in the body of your report and handling null values
    • Creating a simple table of records along with labels for each column
    • Inserting a heading for a group of records
    • Using parameters to filter records during report processing
    • Implementing groups within groups — a nested hierarchy
    • Adding a simple footer to your report
    • Displaying general information or summary at the end of your report
  • Chapter 3: Enhancing the Look and Feel of your Report
    • Introduction
    • Deploying and reusing styles in your report
    • Setting background color for data
    • Using HTML tags and bullet lists
    • Expanding a field vertically to accommodate large text
    • Applying formatting pattern to the value of a data field
    • Using background images and watermarks in your report
  • Chapter 4: Working with a Variety of Data Sources
    • Introduction
    • Creating a report from relational data
    • Connecting to an XML datasource
    • Creating a report from XML data using XPath
    • Using multiple relational databases to generate a report
    • Creating a report from model beans of Java applications
  • Chapter 5: Multi-page Reports
    • Introduction
    • Building a cover page for your multi-page report
    • Creating a simple, one-page TOC for your report
    • Applying a style to your simple TOC
    • Resetting page numbering with the start of a particular record
    • Implementing complex multi-dimensional page numbering
    • Showing multiple types of data in the same report
    • Managing pagination of multiple types of data in a report
  • Chapter 6: Multi-column Reports
    • Introduction
    • Dividing the body of a report into multiple columns
    • Displaying groups of data in separate columns
    • Displaying data as name-value pairs in multiple columns
    • Filling your report horizontally in multiple columns
    • Using subreports to design a multi-column report
  • Chapter 7: Summary Report, Crosstabs, and Graphs
    • Introduction
    • Designing a simple summary report
    • Designing a multi-level summary report
    • Designing a crosstab—a table with dynamic rows and columns
    • Displaying data trends as a graph in your report
    • Embedding a bar graph inside a tabular view
  • Chapter 8: Java Wrappers for your JasperReports
    • Introduction
    • Creating a Java wrapper for your report
    • Compiling and viewing your report in a Java Swing application
    • Printing the hardcopy of your report using a Java Swing application
    • Creating an Excel report from a Java Swing application
    • Creating a JasperReport on the fly in a Java web application

Bilal Siddiqui

Bilal Siddiqui is an Electronics Engineer, an XML consultant, and the founder of XML4Java.com, a company focused on simplifying e-business. After graduating in 1995 with a degree in electronics engineering from the University of Engineering and Technology Lahore, he began designing software solutions for industrial control systems. Later, he turned to XML and used his programming experience in C++ to build web- and WAP-based XML processing tools, server-side parsing solutions, and service applications. Bilal is a technology evangelist and a frequently published technical author.

Bilal has been focusing exclusively on Java and XML-based open source tools and solutions since 2006. He has extensively used popular open source products such as JasperReports, ADempiere, Openbravo, and Eclipse. Bilal is a strong advocate of open source tools and is engaged not only in designing solutions based on open source tools but also collaborating with local universities in Lahore to train software and IT personnel in using open source technologies.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

JasperReports 3.6 Development Cookbook +    IBM Cognos 8 Planning =
50% Off
the second eBook
Price for both: $42.00

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Create, position, and enhance the title, header, footer, and body of your report
  • Use dynamic titles—those that can change during report processing
  • Use mathematical and logical expressions to calculate sum, average, maximum, and to sort, arrange, and extract data making it easier for you to analyze, share, and manage business information more effectively
  • Create a report from various data sources such as relational data, XML data, or model beans of Java applications
  • Create multi-page reports, with a cover page and table of contents (TOC) and manage pagination of multiple types of data
  • Use sub-reports to design a multi-column report
  • Design simple or multi-level summary report, and cross-tabs
  • Create bar charts and graphs to show data trends
  • Generate reports from Java Swing applications or web applications

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. While such reports are pivotal in managing business information more effectively, creating and customizing them can get tedious.

This book will give you recipes to solve common JasperReports problems to make your life easier. It will take you through complex examples related to JasperReports with step-by-step instructions on how to solve them.

The author's experience in creating reports enables him to share over 50 recipes to develop crystal-clear business reports using the capabilities of JasperReports and the amazing features provided by its visual report designer tool: iReport.

This cookbook will arm you to develop user-friendly reports by using multiple types of data in the same report, thereby saving your time in sorting, arranging, or extracting data and making the whole process effortless. First you will learn to do basic things such as creating, sizing, positioning, and enhancing the titles, headers, footers of the report. You will move on to working with the body and footer of the report, including using parameters to filter records during report processing and implementing nested hierarchy. Second, you will learn to enhance the look and feel of your report by deploying and reusing styles, and by using designs, textual effects, background images, and watermarks. You will also learn to use mathematical and logical expressions such as counting the number of records with a particular field value, grouping records, applying styles on your data based on logical or mathematical conditions, and so on.

Then you will be able to do advanced things such as working with a variety of data sources: relational data, XML data, model beans of Java applications, and also multiple relational databases at once. You will learn to build a cover page and table of contents for multi-page reports, display multi-dimensional page numbering, and much more. You will be able to design simple and multi-level summary reports, cross-tabs with dynamic rows and columns, create bar charts, and display data trend graphs in your reports. Lastly and very importantly, you will be able to generate reports from Java Swing applications after you learn how to use JavaWrappers for your JasperReport.

Create and enhance your business reports using the various functionalities of JasperReports and iReport

Approach

The entire book is a comprehensive collection of recipes meant to tutor you on making and enhancing reports. Each recipe provides you with easy step-by-step descriptions of the actions necessary to accomplish a specific task with explanations to help you to understand how and why each action was undertaken. Example values and code samples are used throughout the recipes, which makes adaptation for individual needs easy. Each recipe uses a concrete example for easy understanding.

Who this book is for

This book is for Java developers who want to use JasperReports to create user-friendly business reports. It is for those who may be familiar with JasperReports but want to dive into advanced JasperReports activities.

If you know how to use Microsoft Word you can also learn how to design business reports using iReport by following the recipes of this cookbook.

Although the primary audience of this cookbook are report designers, however Java and XML developers will find this book useful in understanding how Jasper’s XML code works and how to wrap JasperReports functionality in your Java Swing or Web applications.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software