iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library iReport Ultimate Guide - Nimsoft Library

13.07.2015 Views

iReport Ultimate GuideWhen you add a row or column to a crosstab, iReport creates a special variable that refers to the value of the bucketexpression. It has the same name as the new group. When you edit a textfield expression of elements in a cell, the expressioneditor pops up. It lists all the objects that can be displayed in a crosstab cell (see Figure 16-10).Figure 16-10 Objects that can be used in a crosstab textfield expressionWhen you create a new group, iReport creates the new header cell for the group; in the group, iReport uses a new textfield todisplay the group value (using a built-in variable having the same name as the group) and fills the new cell with a textfield todisplay the first measure available in the crosstab.No extra cell display options are applied; in particular, iReport does not set borders for the new cells.If Total Position is set to a value other from None (usually End), iReport inserts other cells to host the subtotals. Thosecell are created empty, so again you must drag a textfield element into each cell and set a proper expression for the data todisplay (see Figure 16-11).314

CrosstabsFigure 16-11 Empty row total cellsThe order of the groups can be changed by dragging them in the outline view. Please note that the crosstab layout is strictlytied to the group order settings.16.2.1 Modifying CellsCrosstab have header cells, total cells, detail cells, and (optional) when-no-data cells. Each intersection between a row and acolumn defines a cell. Cells can contain a set of elements, such as textfields, static texts, rectangles, and images, but they can’tcontain a subreport, chart, or another crosstab. Figure 16-11 showed a crosstab with some colored cells and several textfields.You can modify the background color and borders of each cell: right-click the cell you want to change to display the contextmenu and choose Padding And Borders to modify the cell borders (see Figure 16-12).Figure 16-12 Modifying Cell BordersThe cell background and style can be modified in the property sheet when you select a cell node in the outline view (seeFigure 16-13).Figure 16-13 Cell Background and Style315

CrosstabsFigure 16-11 Empty row total cellsThe order of the groups can be changed by dragging them in the outline view. Please note that the crosstab layout is strictlytied to the group order settings.16.2.1 Modifying CellsCrosstab have header cells, total cells, detail cells, and (optional) when-no-data cells. Each intersection between a row and acolumn defines a cell. Cells can contain a set of elements, such as textfields, static texts, rectangles, and images, but they can’tcontain a subreport, chart, or another crosstab. Figure 16-11 showed a crosstab with some colored cells and several textfields.You can modify the background color and borders of each cell: right-click the cell you want to change to display the contextmenu and choose Padding And Borders to modify the cell borders (see Figure 16-12).Figure 16-12 Modifying Cell BordersThe cell background and style can be modified in the property sheet when you select a cell node in the outline view (seeFigure 16-13).Figure 16-13 Cell Background and Style315

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!