To run a report of type JasperReport, you must have the following
files in the specified locations:
- An EGL project with a build descriptor file.
- A compiled report design file (extension jasper) somewhere
on your system. Specify the location of the report design file in
the report driver program. For more information, see Creating the JasperReport design file.
- A report driver program (extension .egl) in the EGLSource folder
of the project. See Writing code to drive a report of type JasperReport.
- Optionally, you can have a report handler (extension .egl) in
the EGLSource folder of the project.
- If your report driver program accesses a database, you might need
to tell EGL where to find the appropriate Java™ Database Connectivity (JDBC) driver. You
might need to add an external Java Archive
(JAR) file to your project properties.
To create and fill a report for an EGL project, follow these steps:
- Build the EGL project by clicking or . EGL automatically generates Java code from any EGL source files
that have changed since the last build and compiles any changed design
document source files.
- Run the Java program that
contains the generated report driver program. One way to do this in
the Package Explorer view is to navigate to and right-click the .java
file that contains the code. Then select from
the menu.
When you create a report, the JasperReports engine first creates
an intermediate destination file (extension .jrprint), from which
it can create multiple export files in different formats (.pdf, .html,
.xml, .txt, or .csv). You specify locations for all of these files
in the report driver.