Build Generated SamplesFor a current build generated reference of samples, click here. JasperReports Library SamplesThe JasperReports project tree containing the library source files and several demo applications that are easy to run and test using the Ant build tool. The project is available for download at SOURCEFORGE.NET. The samples can be found in the Details about the structure of a For a quick review of the JasperReports library features, we present here some of those sample reports. | [toc] |
Jasper Sample
This is the most complex sample provided with the package. It explains how to use data grouping and more complex element formatting.
Crosstab Sample
Crosstabs are a special type of table component in which both the rows and the columns are dynamic. They are used to display aggregated data using tables with multiple levels of grouping for both columns and groups.
Subreport Sample
Illustrates how subreports might be used in more complex reports.
Data Source Sample
When generating reports, JasperReports can make use of various kinds of data, as long as the parent application provides a custom implementation of the net.sf.jasperreports.engine.JRDataSource
interface that will allow it to retrieve that data. The library comes with a default implementation of this interface that wraps a java.sql.ResultSet
object and lets people use JDBC data sources seamlessly.
Fonts Sample
Text formatting features are very important in document generating software and JasperReports offers a complete range of font settings: size, style, text alignment, color, etc.
Horizontal Sample
The engine can fill multi-column reports either vertically (from top to bottom) or horizontally (from left to right), depending on the "printOrder" attribute specified in the report design. Here's a sample showing the detail section being generated horizontally.
Hyperlink Sample
This sample illustrates the use of hyperlink elements. They allow the creation of drill-down repots and generally speaking offer a higher degree of interaction with the document viewers.
I18n Sample
The library has built-in support for generating documents in different languages.
Images Sample
In this sample, users will learn how to use image elements in their reports.
JFreeChart Sample
This sample shows how you can include graphics and charts into your reports. The JasperReports library does not produce graphics and charts itself, but allows the use of other specialized libraries and easily integrates this type of elements into the documents it generates.
Scriptlet Sample
Scriptlets are a very flexible feature of the JasperReports library and can be used in many situations to manipulate the report data during the report filling process.
Shapes Sample
Shows how different graphic elements such as lines and rectangles can be used in the documents.
Stretch Sample
This is a special sample with debug purposes. It shows how the text fields behave when they stretch downwards in order to acquire their entire content. Element stretching and page overflow mechanisms are very sensitive aspects of report generating tools.
Styled Text Sample
The text elements can contain style information introduced using an XML syntax based on nested tags.
Table of Contents Sample
Some reports may require the creation of a "table of contents" structure, either at the beginning of the document or at the end. Here is a simple example for those who want to learn how to create such structures.
Unicode Sample
JasperReports can generate documents in any language. This is a simple example that shows how font and text encoding settings should be used.
Barbecue Sample
Sample that shows how to include barcodes inside reports using the Barbecue open source library.
Landscape Sample
Shows how to set up a report in "Landscape" format.
Recommended Comments
There are no comments to display.