Using JasperReport templates

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:
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 Ctrl+space
  3. 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:
  1. Move your cursor to a new line within the main() section of your program.
  2. Type jas, then press Ctrl+space
  3. The editor provides 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 that you need to change.
You can edit the templates themselves by following these steps:
  1. Click 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 click OK to save your changes.

Feedback