| Number | Name | Date of Birth | Gende | Qualification | Scholarship |
|---|---|---|---|---|---|
| 1 | Nancy | 1948-12-08 | M | Middle | ¥2000.00 |
| 2 | Andrew | 1952-02-19 | F | High School | ¥3000.00 |
| 3 | Janet | 1963-08-30 | M | Middle | ¥2500.00 |
| 4 | Margaret | 1937-09-19 | 女 | College | ¥2600.00 |
| 5 | Steven | 1955-03-04 | F | Junior | ¥2100.00 |
| 6 | Michael | 1963-07-02 | F | Master | ¥3500.00 |
| 7 | Robert | 1960-05-29 | F | Junior | ¥2900.00 |
| 8 | Laura | 1958-01-29 | M | College | ¥1800.00 |
| 9 | Anne | 1966-01-27 | M | Junior | ¥2200.00 |
| 10 | Chris | 1970-09-18 | F | Junior | ¥2300.00 |
As shown, the display format and display values, make the report more readable enhancements, more beautiful.
Here we look at the process of using java reporting tools FineReport achieve the above statements.。
1.Connect database frDemo
2.Design Report
2.1 New Report
2.2 Meter sample design
The basic framework of the following diagram design good report.

Create a data set called emp_sql
SQL statements:select empid,empname,birthday,sex,degree,bonous from employee
2.4 Binding data columns

Follow these forms will be dragged into the field data sets corresponding statements within the cell, and make the appropriate settings.
| cell | Contents | The basic property settings |
| A2 | emp_sql.EMPID | Extend from top to bottom,center, and the remaining default |
| B2 | emp_sql.EMPNAME | Extend from top to bottom,center, and the remaining default |
| C2 | emp_sql.BIRTHDAY | Extend from top to bottom,center, and the remaining default |
| D2 | emp_sql.SEX | Extend from top to bottom,center, and the remaining default |
| E2 | emp_sql.DEGREE | Extend from top to bottom,center, and the remaining default |
| F2 | emp_sql.BONUS | Extend from top to bottom,center, and the remaining default |
3.Display Format Sets
-
Date field displays the set format
Right-click the cell C2 | Style | Date,select yyyy-MM-dd format (pictured), and click OK

-
bonus field shows the format Setting
cell F2 is set right click | Style | currency,select the display format for ¥ 12345.68 (eg ), click OK

-
Show value setting
-
Gender field displays the value setting
Double-click the cell D2 cell data column settings pop-up box, click Advanced, enter if in a custom display value ($$$ == 1, ‘male’, ‘female’), and click OK. If (condition value 1 value 2):If the condition is satisfied, equal to the value 1. If not satisfied, equal to the value 2

-
Setting academic field displays values
To add data collection deg_sql****SQL statement:select ID,name from degreesE2 cell right-click | Form | Data Dictionary | data query,data set name selection deg_sql report dataset under column number (actual value) is set to 1, the column number (display value) to 2 (Fig. 1), preview (Figure 2), and click OK. Column number (actual value) is encoded in the report design field where the column number is displayed, that is to be placed among the field to a report in the report design.
Column number (displayed value) is represented by the actual data encoding where the column number, which is then converted by the data dictionary, the actual data when the report preview to see.

4.Save Preview
Save as:
%FineReport_HOME%/WebReport/WEB-INF/reportlets/com/doc/3.2.cpt
Start the Report Server, enter the following address in your browser to browse:
http://localhost:8079/WebReport/ReportServer?reportlet=/com/doc/3.2.cpt


