This chapter describes the steps necessary to start creating your own reports. JasperReports report definition files are stored using jrxml extension. This is the extension officially recommended by Teodor Danciu, the author of JasperReports reporting engine. For backward compatibility, the xml extension is also supported, but the jrxml extension should be preferred.
JasperAssistant provides an Eclipse perspective dedicated to report development. This perspective provides an optimal layout for your Eclipse Workbench and includes all the views required while working with JasperAssistant. To open the JasperAssistant perspective select the following option from the the Eclipse menu:
Window->Open Perspective->Other...->JasperAssistant
Before creating your first report, ensure that you have at least one project created. To create a project select File->New->Project... from the menu.
To create a new report, use the provided report wizard that will help you start. To open the report wizard choose File->New->Other... from the menu and then select JasperAssistant->Report from the wizard selection dialog.
A report can also be created by using an existing template. JasperAssistant does not yet provide standard templates but you still can create your own skeleton reports and reuse them later as templates. To create a new report from a template, simply copy the template file to a new file you wish to use for your report.
Procedure 4.1. New report wizard steps
File name selection
First step requires you to specify the name of the file and its location. The report can be created directly from this step by choosing
.Data source selection
This step allows you to select a data source from the list of configured data sources (Section 3.3, “Data Sources”). Selecting a database type data source activates the button. Selecting a custom type data source such as bean array based data source, also activates this button. The report creation can be finished directly from this step by choosing .
SQL query specification
This step is available only for database type data sources. It allows you to specify the SQL query that will supply the data for the report. For other data source types this step is skipped. Enter the query and press
button to proceed to the next step. If you do not wish to enter the SQL query at this point, choose the button to create the report.Field selection
This step allows you to select the data source fields for the report. After selecting the desired fields, choose the
button to create the report.