Using report templates

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:
To add a report handler template to your source file, follow these steps:
  1. Open a new file in your text editor.
  2. Type handler, then press Ctl+space
  3. 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:
  1. Move your cursor to a new line within the main() section of your program.
  2. Type jas, then press Ctl+space
  3. The editor will offer you a menu with options for database, custom, or SQL data; select the appropriate template.
  4. 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:
  1. Select Window > Preferences.
  2. When a list of preferences is displayed, expand EGL.
  3. Expand Editor and select Templates.
  4. Scroll through the list of templates and select a template. For example, select handler to display the report handler template.
  5. Click Edit.
  6. Change the template to meet your needs.
  7. 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

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.