Jump to content
We've recently updated our Privacy Statement, available here ×

  • Giulio Toffoli
    • Product: JasperReports® Library

    Build Generated Samples

    For a current build generated reference of samples, click here.

    JasperReports Library Samples

    The 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 demo/samplesdirectory of the project. Some of them use data from the HSQL default database that is also supplied in the demo/hsqldb directory of the project.

    Details about the structure of a JRXMLreport design and the use of different elements are available in the Schema Reference document. For each sample below, a *.Zip file is provided that includes the *.jrxml, *.pdf and *.html  file.

    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.

    FirstJasper.zip

    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.

    ShipmentsReport.zip

    Subreport Sample

    Illustrates how subreports might be used in more complex reports.

    MasterReport.zip

    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.JRDataSourceinterface that will allow it to retrieve that data. The library comes with a default implementation of this interface that wraps a java.sql.ResultSetobject and lets people use JDBC data sources seamlessly.

    DataSourceReport.zip

    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.

    FontsReport.zip

    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.

    HorizontalReport.zip

    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.

    HyperlinkReport.zip

    I18n Sample

    The library has built-in support for generating documents in different languages.

    I18nReport.zip

    Images Sample

    In this sample, users will learn how to use image elements in their reports.

    ImagesReport.zip

    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.

    JFreeChartReport.zip

    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.

    ScriptletReport.zip

    Shapes Sample

    Shows how different graphic elements such as lines and rectangles can be used in the documents.

    ShapesReport.zip

    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.

    StretchReport.zip

    Styled Text Sample

    The text elements can contain style information introduced using an XML syntax based on nested tags.

    StyledTextReport.zip

    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.

    TableOfContentsReport.zip

    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.

    UnicodeReport.zip

    Barbecue Sample

    Sample that shows how to include barcodes inside reports using the Barbecue open source library.

    BarbecueReport.zip

    Landscape Sample

    Shows how to set up a report in "Landscape" format.

    LandscapeReport.zip


    More Samples

    JasperReports Server Samples

    Jaspersoft Themes Samples


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...