Overview
Application Scenario
If data specified by all fields in a data table is displayed in one row of a report, the report looks very crowded. In this case, you can use a free report to display data with better appearance and readability.
Function Description
Through a free report, you can distribute a single record data into multiple rows by section or page, rather than displaying it in the same row.
For example, you can display the data of the same order across multiple rows in the same table block and extend the table blocks vertically for different orders, as shown in the following figure.
Example
Data Preparation
Create a dataset ds1, and write the SQL query statement SELECT * FROM Orders in the database query dialog box to extract all data from the Orders table, as shown in the following table.
Report Design
1. According to the instructions in the following table, set the style for Order Statistics Table.
Cell | Operation |
---|---|
A1 to D2 | Merge cells A1 to D2 and enter the title Order Statistics Table. Set the font size to 12, and center the text in bold. |
A3, A4, C4, A5, C5, A6, A7, and C7 | Enter the following field titles in order: Order ID, Order Date, Shipping Date, Customer ID, Customer Name, Address, Delivery Date, and Amount Payable. Align the text to the left. |
B3 to D3, B4, D4, B5, D5, B6 to D6, B7, and D7 | Merge cells B3 to D3 and B6 to D6 respectively, add black bottom borders to blank cells, and align the text to the left. |
The following figure shows the method to add a black bottom border to a cell.
Different browsers may have different display effects for the bottom border due to different modes.
In the compatibility mode, browsers such as Firefox, 360, CM, and Sogou display the preview normally.
In the speed mode, browsers like Google Chrome, 360, CM, and Sogou may show a bottom border under the Customer Name field.
The following figure shows the designed style for Order Statistics Table.
2. Drag the relevant data columns from the dataset into cells B3, B4, B5, B6, B7, D4, D5, and D7 according to the field titles, as shown in the following figure.
3. Select cells B4, D4, and B7 respectively, and choose Cell Element > Format on the right property panel. Set Format to Date and select yyyy-MM-dd, as shown in the following figure.
4. Select cell D7, choose Cell Element > Format in the right property panel, set Format to Number, and select #0.00 to round the number to two decimal places, as shown in the following figure.
Setting Parent Cells
Select cells A1, A3, and A4 to D7. On the right property panel, choose Cell Attribute > Expansion, set Expansion Direction to Vertical, and set Left Parent Cell to B3, as shown in the following figure.
Effect Display
PC
Save the template and click Pagination Preview. The effect is the same as that shown in section "Function Description."
Mobile terminal
The preview effects on the DataAnalyst app and the HTML5 terminal are the same, as shown in the following figure.
Example
Pagination Setting
If you want an order to be displayed on one page during practical usage, you can select the 7th row, choose Cell Attribute > Others, and tick Pagination After Row, as shown in the following figure.
Effect Display
PC
Save the template and click Pagination Preview. The following figure shows the preview effect.
Mobile Terminal
The preview effects on the DataAnalyst app and the HTML5 terminal are the same, as shown in the following figure.
Completed Template
You can download the example template: Free Report.cpt