EGL
provides code that you can add to your program with a few keystrokes.
That
code can provide most of the statements that you need to fill and
export a
report through JasperReports or can give you a template for writing
a report
handler.
To fill and export a report through JasperReports,
choose any of these
data sources for the report:
- Database connection
- Custom
report data
- Result object from a specified SQL query
To add a report handler template to your source file, follow these
steps:
- Open a new file in your text editor.
- Type handler,
then press Ctrl+space
- The editor will replace the word "handler"
with template code. Work through
the code and add statements for the functions that you want to use.
For more
information, including code examples, see Creating an EGL report
handler.
To add JasperReport code to your source
file, follow these steps:
- Move your cursor to a new line within
the main() section of your program.
- Type jas,
then press Ctrl+space
- The editor provides a menu with options
for database, custom, or SQL
data; select the appropriate template.
- The editor will replace
the letters "jas" with code; use the Tab key to
move to the fields that you need to change.
You can
edit the templates themselves by following these steps:
- Click .
- When a list of preferences is displayed, expand EGL.
- Expand Editor and select Templates.
- Scroll through the list of templates and select a template. For
example,
select handler to display the report handler
template.
- Click Edit.
- Change
the template to meet your needs.
- Click Apply and
then click OK to
save your changes.