To create a product report, click on File | New | Jasper Report. Then select the Invoice template.
Now you can click on Next > and we will set up the name of the report. The file name will be Products.jrxml
. Click on Next
>. Then, we will need to select the Data Source:
MySQL
.
Now, you will need to run the Select name, details, price from Product;
query.
After setting the SQL query, you can click on Next >.
Next, you will need to pick the fields that will be used in the report. Select all the fields from the left list and move them to the right list. Then click on Next >. We don't need group ordering for this report, so just skip the group and click on Next > again.
Congratulations! We finished the setup. We can take a look (have a report preview) of the report using Jaspersoft Studio. Just click on the new report called Products.jxml. We will remove all the fields that we don't need, as well as the logo. Then the report will look like this:
We...