Page tree
Skip to end of metadata
Go to start of metadata

Content

1. Overview

In a cross report, there exists both horizontal expansion and vertical expansion of cells. An example of data bidirectional expansion is shown below:

2. Steps

2.1 Create a new data set

Create a new template and add dataset ds1 with SQL statement SELECT * FROM Sales_Volume.

2.2 Report design

According to the figure below, design the template and drag the data columns to the corresponding cells.

The data columns, cells and settings are as follows:

CellData ColumnSetting
A3RegionData setting is Group and expand vertically from top to bottom, other defaults
B3

Salesperson

Data setting is Group and expand vertically from top to bottom, other defaults
C3Product_typesData setting is Group and expand vertically from top to bottom, other defaults
D2ProductData setting is Group and expand horizontally from left to right, other defaults
D3Sales_VolumeData setting is Group and expand vertically from top to bottom, other defaults

Column header: Make Region, Salesperson and Product_Types expand vertically and grouped from top to bottom to realize a column header;

Row header: Make Product expand horizontally and grouped from left to right to realize a row header;

Data: Based on the concept of parent-child cell , the Sales_Volume will take Product_Types as the left parent cell and Product as the upper parent cell ,and match corresponding salesman and product type automatically.

Note: The Sales_Volume has a one-to-one mapping with Salesperson and Product, so just drag Sales_Volume to the cell.

          If the Sales_Volume corresponds to several Salesperson and Product, set the Data Setting of Sales_Volume as Summary-Sum. For details, refer to Data Display Mode - Data Setting.

2.3 Horizontal summation

Write the formula in cells that needs to be summarized:

CellFormulaOther Setting
E3 =sum(D3)The left parent is C3, the other default
F3=sum(D3)The left parent is B3, the other default
D4=sum(D3)Default
E4=sum(E3)Default
F4=sum(F3)Default

 

Cell E3 is the total of of sales volume of one product type of each salesperson. Simply set the left parent of the E3 to C3, and you can get the sum according to product type.

 

The F3 cell is used to summarize the salesperson's sales volume regardless of product type. Simply set the F3's left parent to B3 to sum the salesperson's sales volume.

3. Effect preview

After saving, click on the Pagination preview to see the effect.

Note: If the data in column F is displayed on the next page during preview, you need to adjust the column width of the cell or adjust the paper size. For details, please refer to the Page Setup.

4. Completed template

For completed templates, refer to %FR_HOME%\webroot\WEB-INF\reportlets\doc-EN\Primary\CrossReport\Cross_Report-Data_Bidirectional_Expansion.cpt.