Thursday, November 19, 2009

Creating jasper reports in 4 simple steps


Download the jasper reports Lib and Source from here.
Intro:

    JasperReports is an open-source Java class library
    designed to aid developers with the task of adding
    reporting capabilities to Java applications.
    JasperReports is licensed under the Lesser GNU Public License (LGPL).
Features:
    It has flexible report layout.
    It is capable of presenting data textually or graphically.
    It allows developers to supply data in multiple ways.
    It can accept data from multiple datasources.
    It can generate watermarks.
    It can generate subreports.
    It is capable of exporting reports to a variety of formats.
Flow chart of Jasper Reports Creation
    We can Create Jasper report in Following four steps.


Create JRXML files:
    The first step is to create a report template
    as an XML file.Even though JasperReports'
    report templates are XML files,template filenames
    are given an extension of .jrxml.
    JasperReports XML templates are commonly referred to as JRXML files
Compile JRXML files to create Jasper File :
    JRXML files are compiled into a JasperReports
    native binary template.The resulting compiled
    template is commonly known as the Jasper
    file, and is typically saved to disk with a .jasper extension.
Fill The report:
    The Jasper file is then used to generate the final report,
    by providing it with its required data.
    This process is known as filling the report.
Display the report:
    Filled reports can be saved to disk in a JasperReports 

    native format. Reports saved in this format are known
    as JasperPrint files.
    JasperPrint file names have a .jrprint extension.
    JasperPrint files can be exported to other
    formats so that they can be opened with commonly
    available tools like PDF viewers and word processors.

No comments: