Index

Previewing a Report

Work Area

Having completed the tabs necessary for your report in Report Wizard, you get a draft design as below:

In the report Design window that appears, you can see the work area is partitioned into different sections, consisting of two tabs: Design and View. The Design tab indicates the design mode while the View tab causes JREngine to run the report and presents the result on the screen.

Design Mode

Section

Basically, there are seven sections in a report. They are Report Header, Page Header, Group Header, Detail, Group Footer, Page Footer and Report Footer.

Definition of Sections

Adding and Deleting Sections

To add or delete a section, first move the mouse cursor to the section you want to add or delete. Next, right click to reveal a menu that lists the following commands:

Select Delete, the section which the mouse cursor points to will be deleted.

Select Insert Section After, a copy of the section below the original you selected will be added afterwards.

Other ways of inserting sections:

For all the above methods, a box will appear if you move your mouse cursor in the design window. Place the box in a previous section of the report. This will insert a copy of that previous section right below it.

Resizing Sections

Every section is resizable. To resize a section, position the cursor over its split bar. After the cursor becomes a double-headed arrow, press the left button, drag and drop the split bar to its desired position.

You can also resize more accurately with Report Inspector. Simply highlight the section and go to Report Inspector. Find Height and Width under Geometry. You may change the area of the section by changing the value in Height and Width.

Ruler, Grid and Guideline

Ruler

In the design mode, you can display horizontal and vertical rulers for better positioning of the objects. Selecting Show Rulers from the View menu to show the rulers.

Grid

In the View menu, on the View menu, you can see Grid Size, Show Grids and Snap to Grids.

Guidelines

Guidelines are provided for easy and accurate alignment of objects in the Design tab. To display your guidelines, you can go to the View menu and select Show Guidelines.

View Mode

Click the View tab and JREngine will begin running the report. The result will be shown in the viewer. To optimize the performance, notice that JReport Designer displays report pages before they are completely generated.

The Toolbar of View Tab

In the View mode, you can see a toolbar used to go backwards or forwards in viewing your report, and also to refresh the data or stop generating the report, etc.

Below are the function expainations of the buttons on the toolbar listed one by one in sequence.

Dynamic Sort

You can sort the records in the report dynamically in the report view mode. To do this, move the mouse cursor to the field you want to sort, right click and select the option you want on the pop-up menu.

Select Sort Ascending, the records displayed will be sorted in an ascending order (A, B, C). Selecting Sort Descending, the records will be sorted in a descending order (C, B, A).

Drill-down

You can drill down on Aggregate level fields in your report. Drilldown is made possible where there is a summary for a group. For example, we create a report grouped by Customer Region, and create a group summary on the Annual Sales. When you view the report, point your mouse at the total annual sales for a region, and click it. The drill-down report is displayed.

Usually in this case we will hide the detail section and only show it in the drill-down report. To do so, select the detail section, and go to Report Inspector. Set its Invisible property to true. Then view the report again, and it will show without the details.

Place the mouse on the Annual Sales summary. When the small hand appears, click it, and the drill-down report will be displayed.

Index