20,73 €
Although JasperReports is the world's most popular open source Java reporting library, it has always lacked one thing: It doesn't provide a tool to visually design reports. iReport is a visual report designer built on JasperReports that fills that lack. It is an intuitive and easy-to-use visual report builder/designer for JasperReports, written in 100% pure Java.
This beginner's tutorial book is a straightforward introduction to the iReport environment taking an example-oriented approach in developing your skills from scratch. It shows you how to use iReport for creating reports in PDF, RTF, and other formats, which can be delivered over the Web for immediate access.
This book will guide you through using iReport to develop various types of reports from a simple report through to dynamic enterprise-level reports based on realistic examples based on a sample Inventory Management System. It takes you through the main types of report available in iReport, and shows you exactly how to create them. It shows you how to use different report templates, how to use special kinds of data operations to generate more powerful reports, combine data to produce master-detail reports, add images, control the layout and formatting of your report and many more.
It will also show you how to use the NetBeans IDE to create Java projects with reporting facilities. You will learn how to vary report format and layout according to business requirements.
Step-by-step example-driven tutorials make this book very easy to follow. Practical, realistic business examples, many relevant screenshots, and simple discussion of prior concepts help readers to understand from the simplest to the most complex concepts.
This book is for business intelligence reporting tool users and developers who have working experience in Java but are new to iReport. The book covers from developing a simple report to charting and producing summary reports in iReport, so it is suitable both for the initial learners and experts who produce extensive reports for business applications.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 140
Veröffentlichungsjahr: 2010
Copyright © 2010 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: March 2010
Production Reference: 1250210
Published by Packt Publishing Ltd.
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.
ISBN 978-1-847198-80-8
www.packtpub.com
Cover Image by Karl Swedberg (<[email protected]>)
Author
Shamsuddin Ahammad
Reviewer
Giulio Toffoli
Acquisition Editor
Douglas Paterson
Development Editor
Chaitanya Apte
Technical Editor
Siddhant Rai
Copy Editor
Leonard D'Silva
Indexer
Monica Ajmera Mehta
Editorial Team Leader
Mithun Sehgal
Project Team Leader
Lata Basantani
Project Coordinator
Srimoyee Ghoshal
Proofreader
Cathy Cumberlidge
Production Coordinator
Shantanu Zagade
Cover Work
Shantanu Zagade
ShamsuddinAhammad is a Senior Lecturer at Daffodil Institute of IT (DIIT), Bangladesh. He is the Course Coordinator of IT programs at DIIT. He has been teaching Java Programming, Database Systems, Systems Analysis and Design since 2002. He has experience in supervising hundreds of academic projects. Shamsuddin has a Masters degree in Management Information Systems from Daffodil International University, Dhaka. He obtained a BSc degree in Computing & Information Systems of NCC Education Ltd, UK and London Metropolitan University joint program from Daffodil Institute of IT. He is an additional article reviewer of the CONQUEST conference, Germany. He has been maintaining several blogs on Java technologies for years.
Extraordinary moral support of my respected parents and my loving wife Jesmin Rashid is the greatest inspiration to write this book.
My brother and sisters, my relatives, friends, and my colleagues at Daffodil Institute of IT have inspired me a lot in writing this book—special thanks to all of them. I'm very thankful to my friend Shahed Hasan for his warm support.
It is my great fortune to have worked with a great team of publishing professionals at Packt Publishing. My sincerest gratitude to Douglas Paterson, Srimoyee Ghoshal, Chaitanya Apte, and Siddhant Rai for their great cooperation in writing the book.
Giulio Toffoli is a Senior Software Engineer at JasperSoft Corporation, where he serves as the iReport project leader. He has been developing Java applications since 1999 and founded the iReport project in 2001. During this time, Giulio has enjoyed designing complex software architectures and implementing custom software solutions with a focus on desktop and multitiered, web-based, client-server applications using Java (J2EE/JEE) and open source technologies. Giulio has a degree in computer science from the University of Bologna and currently resides in Italy. Giulio has written several tutorials and articles about iReport and JasperSoft technologies. He is the author of The Definitive Guide to iReport, Vol. 2, edited by Apress, and co-author of JasperServer Ultimate Guide.
iReport is an intuitive and easy-to-use visual report designer/builder for JasperReports, which is written in Java.
Users can visually edit complex reports with charts, images, and subreports, as iReport is integrated with the leading open source library—JasperReports. JasperReports is the world's most popular open source Java reporting library, but doesn't provide an adapted tool to visually design reports. iReport is a visual report designer built on JasperReports. A person without much confidence with XML might not be able take full advantage of the JasperReports library. iReport works perfectly for such people.
This book is a straightforward introduction to the iReport environment taking an example-oriented approach in developing your skills from scratch. It will guide you through developing a simple report to a dynamic enterprise level report using iReport.
This book is a beginner's tutorial, which shows you how to use iReport for creating reports in PDF, RTF, and so on, which can be sent over the web for immediate access.
It will guide you in developing various types of reports, using realistic examples based on a sample Inventory Management System. This book takes you through the main types of reports available in iReport, and shows you exactly how to create them. It shows you how to use different report templates, how to use special kinds of data operations to generate more powerful reports, combine data to produce master-detail reports, add images, control the layout and formatting of your report, and much more.
This book will also show you how to use NetBeans IDE for creating a Java project with reporting facilities. You will learn about report formatting and layout according to business requirements.
Chapter 1, Introduction to iReport, looks at what iReport is, what you can do with iReport, the history of iReport, and installing iReport.
Chapter 2, Building your First Report, covers creating a new data source or database JDBC connection, creating a report using the Report Wizard, using the design query to produce the SQL for the report, viewing the report using the built-in viewer, exporting the report in different formats like PDF, RTF, and so on.
Chapter 3, Report Layout and Formatting, covers configuring report properties, understanding bands, configuring and using report bands, maintaining the size, position and alignment of the report elements, modifying report fonts, using the library, using borders, and modifying element properties.
Chapter 4, Using Variables, discusses the use of variables, adding variables in a report, and writing variable expressions.
Chapter 5, Using Parameters, discusses the necessity of parameters, adding/ modifying parameters, and modifying the SQL query for using the parameters.
Chapter 6, Grouping Data in Reports, discusses report groups and grouping data together.
Chapter 7, Subreports, covers what subreports are, creating subreports, compiling subreports, linking the main report to the subreport, and passing data between the main report and the subreport.
Chapter 8, Crosstab Reports, discusses what crosstab elements are and how to use crosstab elements in reports.
Chapter 9, Charting, covers how to create reports with pie charts, 3D pie charts, and bar charts.
Chapter 10, Working with Images, covers how to display images in reports from the database, how to display static images from the hard drive, and how to set background images in a report.
Chapter 11, Calling Reports from Java Applications, discusses the JasperReports library for calling iReport from your Java application.
Chapter 12, iReport in NetBeans, discusses installing iReport plugins in NetBeans and creating reports from within the NetBeans IDE.
Appendix, A Sample Database, explains a sample database design and the development of an inventory management system.
The following software must be installed for this book:
http://sourceforge.net/projects/ireport/files/
JDK 6http://java.sun.com/javase/downloads/index.jsp
NetBeanshttp://netbeans.org/downloads/index.html
MySQL 5http://dev.mysql.com/downloads/mysql/5.5.html
MySQL GUI Toolshttp://dev.mysql.com/downloads/gui-tools/
This book is for people new to iReport, business intelligence reporting tool users, and developers who have working experience in Java. This book shows you how to develop a simple report, reports with charts, and summary reports in iReport. Thus this book is a perfect choice for both the initial learners and the experts, who produce extensive reports for business applications.
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title via the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail <[email protected]>.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book on, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Downloading the example code for the book
Visit http://www.packtpub.com/files/code/8808_Code.zip to directly download the example code.
The downloadable files contain instructions on how to use them.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]> with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.
iReport is a reporting tool, developed in Java that helps users and developers design reports visually. Through a rich and simple-to-use user interface, iReport provides the most important functions to create complex reports easily, thus saving a lot of time.
iReport uses the JasperReports library inherently to create reports. JasperReports is, in a sense, the core of iReport. JasperReports is the most popular open source reporting library for Java technology, and iReport is a visual report designer for JasperReports. JasperReports has hundreds of features, but it itself doesn't provide any tool to visually design reports. A person without much confidence with XML might not be able take full advantage of the JasperReports library. iReport works for such people as well as for the expert report developers.
A report produced in iReport can be integrated in your open source or commercial application to generate reports, display them on screen, or export them in several formats including PDF, OpenOffice, DOCX, and many others. Alternatively, you can transfer the result through a web application or send the final document directly to a printer.
It is extremely easy to integrate JasperReports in any Java application using iReport. However, if you need an environment to use the reports without having to write a custom application, you may consider using JasperServer. JasperServer provides:
iReport can connect to any database and acquire data from different data sources. It can export the reports to PDF, XHTML, OpenOffice, MS Word, MS Excel, XML, Text, and many more. To understand what you can do with iReport, let's have an overview of the features.
The User Interface (UI) of iReport is very user friendly. It provides some easy steps to generate reports using the Report Wizard.
The UI features of iReport include:
You can design your report using a smart report designer. The following are some of the features of the designer:
