EGL does not provide a mechanism for report layout. To generate
a report layout you must use one of the following methods:
- Import a JasperReports design file (extension jasper).
- Use a text editor or specialized tool to create a JasperReports
XML design file (extension jrxml). The EGL runtime compiles
that source into a .jasper design file automatically; for information
about this process, refer to the EGL Programmer's Guide.
You
can use either of the following two specialized tools to create an
XML design file:
The EGL report driver (which you write to drive report production)
identifies the JasperReports design file (extension
jasper)
and relies on that design file for a number of formatting definitions:
- The design file defines fonts, headers, footers, the fields to
be printed in the report, the positions of those fields, subtotals
from those fields, and other basic components of the report.
- If you use a database connection as the source of the report,
the design file probably contains your SQL query.
- The design file can create nested subreports to provide additional
data for each line item in the report. For more information, refer
to the EGL Programmer's Guide.
XML report design documents expect Java™ data
types. See Mapping EGL primitives to Java.
At run time, your EGL report driver sets up basic parameters, then
transfers control to the JasperReports engine. The JasperReports engine
creates an intermediate file called the destination file (extension jrprint)
and fills this file with report data. Based on the specifications
in the report driver, the JasperReports engine then transforms the
destination file into a different format. This operation is called
exporting. Exported file formats can be .pdf, .html, .xml, .txt, and/or
.csv.
If you also code an EGL JasperReport handler, the finished report
can reflect events that occurred as your EGL report driver filled
the report with data. For example, you can produce dynamic report
content by comparing report subtotals with outside information like
commission structures or insurance reimbursements.
When you write EGL code that interacts with a report, you also
perform the following actions:
- Create and initialize variables based on the predefined Report
and ReportData parts.
- Interact with the report design by invoking functions from the
reportLib system library, using those variables as arguments in the
function invocations