The cross-view object
The cube data is output using a cross-view object, TfcxpCrossView. Place the "FastCube 2 Cross-tab" object on the report design page:
The main settings for the object are listed in its editor, which is opened by double-clicking on the object. The cross-view editor has two pages of settings and, at the bottom, a drop-down list of the available cubes. After a cube is selected from the list, the first page of settings is displayed (see below). There is a detailed description of the cross-view (grid) toolbar and the grid itself earlier in this manual.
The second page of the editor contains a number of settings related to the cross-view layout:
The diagram is a representation of the cross-view object as it currently appears in the report, using the currently selected style. The drop-down "Select style" menu gives a choice of one of six preset color schemes for the cross-view display layout. At the bottom of the page there are options for customizing the appearance of the cross-view:
- Field names - show field (dimension) names
- Column header - show columns headers
- Reprint column header on new page - repeat column headers on new pages
- Row header - show row headers
- Reprint row header on new page - repeat row headers on new pages
- Border around cells - show border around cells
- Print down then across - if the cross-view is bigger than a page, it is printed first down and then across
- Auto size - defines how cell width and height are calculated (see below)
The Cross-view object properties (TfcxpCrossView) are:
Property | Type | Description |
---|---|---|
data related settings | ||
Cube | TfrcxpCube | data source - cube |
representation related settings | ||
ShowNames | Boolean | show dimension names |
ShowColumnHeader | Boolean | show column header |
ShowRowHeader | Boolean | show row header |
RepeatColumnHeaders | Boolean | repeat column headers on new pages |
RepeatRowHeaders | Boolean | repeat row headers on new pages |
cell size settings | ||
PaintSizes | class | (see table below) |
other settings | ||
DownThenAcross | Boolean | if cross-view is larger than the page, it is printed first down and then across |
GapX, GapY | Extended | horizontal and vertical spacing |
NextCross | TfrcCrossView | next cross-view object |
NextCrossGap | Extended | spacing from the next cross-view object |
The PaintSizes members are:
Property | Type | Description |
---|---|---|
AutoSizeStyle | enumeration | style of automatic size calculationmay have the following values: - ssDefault : DefaultColWidth, DefaultRowHeight are used - ssBySlice : by the size of "actual" grid in editor - ssAutoColWidth : automatic width calculation - ssAutoColWidthRestrict : automatic width calculated with value limitation - ssAutoRowHeight : automatic height calculation - ssByMemoSize : by the size of memo objects nested in cross-view |
MaxColWidth | Extended | width limit when AutoSizeStyle = ssAutoColWidthRestrict |
DefaultRowHeight, DefaultColWidth | Extended | default values for cross-view drawing |
There are several styles for setting the cell width and height while creating the report:
ssDefault - the width and height of all the cells are set to DefaultColWidth and DefaultRowHeight, respectively
ssBySlice - the sizes of the external grid or the editor grid are used
ssAutoColWidth - automatic column width calculation : column width is set according to the values and the fonts in use : the width is large enough to fit all the data in the column
ssAutoColWidthRestrict - also automatic column width calculation (as before) but limited to a MaxColWidth value : if width exceeds MaxColWIdth then the height of the affected row increases
ssAutoRowHeight - automatic row height calculation : row height is set according to the values and fonts in use : the height is large enough to fit all the data in the row, providing that the column width is set to DefaultColWidth.
ssByMemoSize - by the size of the memo-objects, which are embedded in the TfrcCrossView object in the FastReport designer : memo-objects are able to change their size only when AutoSizeStyle = ssByMemoSize
If required the print layout of the cross-view may be further customized. This includes the selection of font (size, style, color etc.), background fill, alignment etc. separately for each memo-object embedded into the TfrcCrossView in the FastReport designer. All these changes are made in the object inspector : the properties are similar to the properties of the TfrxCrossObject component in FastReport.