In this post, am going to show you how to make a report using jasper report library. we will begin by creating a simple crud java web application using primefaces. This application will fetch and post data from and to a database engine. The data will then be exported as a .pdf using the jasper report engine.
1. Background knowledge of java, sql.
1. Netbeans IDE All-version . Can be downloaded from here. Make sure that you have downloaded netbeans with JavaEE support as there are several options for netbeans downloads.see image below
2. Database engine. You can use the database engine of your choice but for this tutorial, I will be using mysql under lampp. For windows its xamp you can get it from here
3. Jasper report netbeans plugin. We will design our report inside the Netbeans IDE for simplicity.
Use can use Jasper studio as a standalone designer.You can download jasper studio from here.
In this example, we are going to use iReport installed in netbeans as a plugin.The plugin can be found here here
Details on how to install it on netbeans can be found here
4. Internet Connection. Maven requires a good connection to the internet in order to download required libraries for your project.ensure that you have a reliable internet connection.
6. MySQL Connector. This is a java library that helps you to connect a java application to a MySQL database engine. It can be found here
. Once you have downloaded the zip file, extract the .jar file and paste it in this:- location /glassfishhome/glassfish/lib/. In case your glass-fish server is running, you must restart it for the changes to take effect.
7. You patience and ability to learn. Programming is something you will learn in your life time. Take it easy and have the spirit of a diehard.
Our final report will be like this.
All materials used in this tutorial can be downloaded from here
click here for the part two