I.Overview
1. Application Scenario
When the data table contains multiple fields, the data of these fields must be displayed in the report, and if all the data is displayed on one line of the report, it will look crowded. At this time, the report can be made into a free report to improve the aesthetics and readability of the report display.
2. Function introduction
The characteristic of the free report is that a record in the database table is not distributed on the same line, but the data is scattered on multiple lines, and the records are displayed in blocks or pages.
For example: display the data of each order in multiple rows in the same table block, and vertically expand the table blocks where different orders are located. As shown below:
II. Examples
1. Data preparation
Create a new data set ds1, write the SQL query statement select * from orders in the database query.
2. Report design
1) Follow the instructions in the following table to design the order statistics table style:
Cell | Operation |
---|---|
A1~D2 | merge A1 ~ D2 cells, write the title "Order Information" |
A3,A4,C4,A5,C5,A6,A7,C7 | write the field title name in turn |
B3~D3,B4,D4,B5,D5,B6~D6,B7,D7 | merge B3 ~ D3 cells, merge B6 ~ D6, only add black outer bottom box to these blank cells |
The report will looks like following:
2) Drag the relevant data columns in the dataset into cells according to the title field.
3) Select cells B4, D4, and select cell attributes > style > text in the right property panel. Set the cell format to date > yyyy-MM-dd.
4) Select cell D7, select Cell Attributes> Style > Text in the properties panel on the right, set the cell format to Number > #0.00, and retain two decimal places for the value, as shown in the following figure:
3. Parent-child cells setting
Select A1, A3, A4 ~ D7 cells, select cell attributes > expand in the right property panel, and customize the parent cell of these cells as B3 cell.
III. Effect preview
1. PC
Save the report and click pagination preview, the effect is same in I. Overview.
2. Mobile terminal
The App has the same effect as the HTML5 side, as shown in the following figure:
For the way to view the report on the mobile terminal, please refer to: Mobile terminal preview of the report
IV. Template download
For completed templates, please refer to:
%fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportDesign\Free.cpt
Click to download the template: