- Open JasperWave Report Designer
- Create new report
- Setup JDBC data source
- Design SQL query
- Report fields - define, preview
- Design the report
- Preview the report
- Export the report
This brief tutorial walks you through building a simple report with JasperWave Report Designer. It introduces the some UI features and basic elements.
At the completion of this tutorial, you should be able to start building your own reports.
Open JasperWave Report Designer
JasperWave Report Designer is a perspective within Eclipse.
To open it, use Window > Open Perspective > Other... and select JasperWave Report Designer
Create new reportNew report might be created in a few ways.
File > New > Other... >JasperWave Report Designer > Report
If JasperWave Report Designer perspective is active, you can use a short link File > New > Report
Using context menu in Browser view
Create JDBC data sourceJasperReports distribution comes with a sample database populated with data which proves to be as useful as it can be for running the supplied demo reports. To use this database you will need to
- Have it up and running
- Configure the connection using JDBC data source
In a command prompt/terminal window browse to the demo/hsqldb folder of the JasperReports source and run the command 'ant runServer'.
D:\tools\jasperreports\demo\hsqldb>ant runServer Buildfile: build.xml runServer: [java] [Server@de6f34]: [Thread[main,5,main]]: checkRunning(false) entered [java] [Server@de6f34]: [Thread[main,5,main]]: checkRunning(false) exited [java] [Server@de6f34]: Startup sequence initiated from main() method [java] [Server@de6f34]: Loaded properties from [D:\tools\jasperreports\demo\hsqldb\server.properties] [java] [Server@de6f34]: Initiating startup sequence... [java] [Server@de6f34]: Server socket opened successfully in 94 ms. [java] [Server@de6f34]: Database [index=0, id=0, db=file:test, alias=] opened sucessfully in 844 ms. [java] [Server@de6f34]: Startup sequence completed in 938 ms. [java] [Server@de6f34]: 2011-04-26 17:24:52.056 HSQLDB server 1.8.0 is online [java] [Server@de6f34]: To close normally, connect and execute SHUTDOWN SQL [java] [Server@de6f34]: From command line, use [Ctrl]+[C] to abort abruptly
Leave window/terminal running. For more details, see JasperReports Getting Started
Open data source registry
Create new JDBC data source
Setup JDBC properties. Use Manage button to configure HSQL JDBC driver
Setup HSQL JDBC driver
Design SQL query
It is assumed that JDBC data source is configured and HSQL DB is up and running
Double click on Dataset query item in Data Explorer view opens data set editor
Query language SQL, active data source HSQL DB.
Start visual SQL builder using Wizard button.
Visual builder allows you to build a complete SQL statement without typing any clause
and execute the resulting statement
Define report fields and check query result
Report fields can be retrieved automatically from the SQL statement using Fields button
In case of any issues (i.e. connectivity), you can perform this operation manually
At any time you can change the SQL query, execute it and see the results
Add fileds to the report
We have designed SQL query and defined report fields.
They appeared in the Data Explorer, in section Fields and might be added to the report template using drag and drop.
Preview the report
Select Preview tab at the bottom of the editor to preview the report
Export the report
Once the report is designed, you can export it in any available format.
File > Export > JasperWave Report Designer > Export report