Cells

Read(302) Label: cells,

This section illustrates cell data type, cells, merged cells, and their naming rules, as well as values and representations on the property bar.

Cells and the naming rule

Run the ReportLite designer and click “New Report” icon to get the following interface:

 

The new report is a grid consisting of neat rows and columns. The grid is made up of cells, which, with all cell values and borders, are arranged to form a report.

 

The naming rule:

The naming rule for a cell in ReportLite is similar to an Excel cell. A column is named after A, B, C, D…, and a row is named after 1, 2, 3, 4…. And a cell is named after “column name + row name”. For instance, the cell highlighted in blue in the above screenshot is named A1, where the letter must be uppercase.

We name the cell at the intersection of the row above row 1 and the column to the left of column A cell 00 or `0, and call it the report primary cell. All cells in the row previous to row 1 (except for the report primary cell) are called column primary cells, and all cells in the column to the left of column A (except for the report primary cell) are called row primary cells.

Besides the report primary cell, row primary cell and column primary cell, all the other cells are called general cells or regular cells.

Merged cell and the naming rule

Select a stretch of continuous cell area and click “Merge|Unmerge” icon to merge the selected cells into a single cell, as shown below. The newly merged cell is called the merged cell.

 

 

The naming rule:

A merged cell is numbered by the top left cell in it. As in the above screenshot, number of the merged cell is “B2”.

The concept of property and expression

This section illustrates the concepts of values and expressions, and their relationship.

 

What are values and expressions?

Select a cell randomly and the property list of the cell will appear on the right part of the designer. Each property consists of value and expression, as the following screenshot shows. But what are their differences?

  

First, the value and the expression is mutually exclusive. You define a value and you need not define and expression; and vice versa.

Second, the value is fixedly defined during report editing. It does not need to be computed during report running and can’t be changed. For instance, you define red for the cell’s background color property, and the cell’s background will always be red during report running without computation and change.

A property expression, however, will be computed. The final value of the property is determined by the result of computing the expression. For instance, you edit a conditional expression for a cell’s background color property, and different colors are displayed when different conditions are met. In a property expression, you can use “value()” to refer to value of the currently cell.

Which properties only need to parse expressions?

Data value property for a statistical graph cell;

Data value property for a subreport cell;

Data value property for a barcode cell.

Which properties need to parse both values and expressions?

All the other properties need to parse both values and expressions.

Cell data type

Select a cell, and click “Data Type” submenu through Report -> Data Type or right-click menu to get the following “Data Type” window, where there are three types – “Normal cell”, “HTML” and “Rich Text”. They mean the cell content can be text or HTML element.