EGL provides
code that you can add to your program with a few keystrokes. That code can
give you a template for writing a report handler or can provide most of the
statements you will need to fill and export a report through Jasper Reports.
In the second case, you can choose from 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 Ctl+space
- The editor will replace the word "handler" with template code. Work through
the code and add statements for the functions you wish 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 Ctl+space
- The editor will offer you 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 you need to change.
You can edit the templates themselves by following these steps:
- Select Window > Preferences.
- 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 OK to save your changes.
Related concepts
EGL report creation process overview
EGL reports overview
Related tasks
Creating an EGL report handler
Setting preferences for templates
Using the EGL templates with content assist
Writing code to drive a report
Related Reference
EGL library ReportLib
EGL report handler
Sample code for EGL report-driver functions