Overview
Application Scenario
If you drag a field from the dataset into a cell without setting cell expansion, all the data will be displayed in a single cell.
With the cell expansion setting, different data from a field can be displayed across multiple cells.
Function Description
FineReport offers three options for expansion direction.
Vertical: The data in the cell expands vertically so that the data is displayed across multiple rows.
Horizontal: The data in the cell expands horizontally so that the data is displayed across multiple columns.
No Expansion: The data in the cell does not expand, and all data is displayed in a single cell.
Example
Data Preparation
1. Create a dataset named ds1, and enter the SQL statement SELECT * FROM Sales_Volume in the database query dialog box to retrieve all data from the table Sales_Volume, as shown in the following figure.
2. Drag the Salesperson field in ds1 to cell A1, center the content, and apply black borders with a yellow background to A1, as shown in the following figure.
Vertical Expansion
1. Select A1, choose Cell Attribute > Expansion > Expansion Direction on the right attribute panel. Since Expansion Direction of fields dragged from the dataset into a cell is set to Vertical by default, you can keep the default setting, as shown in the following figure.
2. Click the dropdown caret in the icon, select Pagination Preview to view the effect of the vertically expanded cell in the browser, as shown in the following figure.
Horizontal Expansion
1. Select A1, choose Cell Attribute > Expansion > Expansion Direction on the right attribute panel, and click the icon to set Expansion Direction to Horizontal, as shown in the following figure.
2. Click the dropdown caret in the icon, select Pagination Preview to view the effect of the horizontally expanded cell in the browser, as shown in the following figure.
No Expansion
1. Select A1, choose Cell Attribute > Expansion > Expansion Direction on the right attribute panel, and click the icon to set Expansion Direction to No Expansion, as shown in the following figure.
2. Click the dropdown caret in the icon, select Pagination Preview to view the effect of the non-expanded cell in the browser, as shown in the following figure.