Jaspersoft studio (1), jaspersoftstudio
Preface
My recent work involves the enterprise report generation function, so I want to use this blog to record my learning process. On the official website of the Jasperreport project, I found a software named Jaspersoft studio. Its version is also 6.3.1 consistent with the Jar package version. Baidu only knows that the IReport version is no longer updated, now we use Jaspersoft studio for development. The software is developed based on Eclipse, and of course it is also open-source and free. Next, start my learning records.
Preparations
Download the Jar package from Jaspersoft community on the Jasperreport development company website. It is best to download the Project package and the template development software Jaspersoft studio.
Report Generation Process
1. JRXML: A report filling template, essentially an XML.
2. Jasper: a binary file compiled and generated by the JRXML template for code filling.
3. Jrprint: The file generated after Jasper is filled with data, which is used to output reports.
4. Exporter: determines the report format to be output and the report output management class.
5. Jasperreport can output report files in multiple formats, such as Html, PDF, and xls.
Template generation: JRXML
Step 1: Open Jaspersoft, right-click and select Jasper Report to create a simple Report file.
Select a report template. Here I will select the simplest blank page. For the convenience of printing, select the size of A4 paper. You can also set the page size based on your needs.
Click next to display a page where you can name your report and click next
Then, go to the data source setting page. Because I am using a MySQL Database, I chose Database JDBC Connection.
The next page is the database link settings. The database name, user name, and password will not be described here. Note that you need to add a database driver.
The result is as follows:
Click Finish. The following page is displayed. The database and table are on the left, and the database statement compiling area is on the right.
Report creation page
Click Finish to create a simple report document. The next step is to fill the report with data and make some beautification work.
This blog is here. For more information about document design, see basic 2.