Java Open Source Report Jasperreport, iReport4.5.1 use detailed (five) Table component __java

Source: Internet
Author: User

Java Open Source Report Jasperreport, iReport4.5.1 use detailed (five) Table component

Through the previous chapters of the study, has a preliminary grasp of the basic use of ireport.

This section describes the use of several particularly useful components. One is table (table), one is crosstab (cross table, next section).

. Use of tables.

① Drag the table component into the report, as shown in the figure:

I use the following examples:

In the Summary section, the table is displayed.

② new DataSet, set number of columns for table

Next

There are two options for you to manually enter the SQL statement, or you can design query, which will be designed for you.

As shown in the figure:

Next, choose the fields you want,

Select the grouping information, or you can add it later when you design the report.

Since then, the dataset has been set up. As shown in the figure:

After the click is complete, automatically jumps to the Table1 tab,

The page looks like this:

Switch to Table 1 tab

③ designed the table as shown in the picture.

There's a statistic field at the back,

is to count all the numbers in each unit, as follows, expression as follows:

$F {unitathleteview_manathlete}+ $F {unitathleteview_femalathlete}+ $F {unitathleteview_guide}+ $F {unitAthleteView_ coach}+ $F {Unitathleteview_teamdoctor}

Note: The default, the table is not a border, if you want to add a border, please add a border: The following:

Select all the static text and text Field,

Right-click to select padding Add Borders

You can set the following parameters.

The final preview effect is as shown:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.