Task 7:Now that the cross tab displays the correct data, you can focus on improving the presentation of data in the cross tab. You perform the following tasks in this section:
Display a string in empty cells
If there are no sales for a particular product in a particular state, the cell displays nothing. Because an empty cell can be interpreted as missing data, you can display a string, such as 0.00 or --, to indicate that the value is zero.
2 Select the cross tab. Select the entire cross tab by clicking on the tab in the lower left corner of the cross tab.
3 In Property Editor, choose the Properties tab, then choose EmptyRows/Columns.
4 In For empty cells, show:, type --, as shown in Figure 17‑16.
Figure 17-16Change the format of the numbers
To indicate that the numbers displayed in the cross tab are dollar amounts, use the currency format. It is also easier to read the numbers if they are aligned to the right.
3 Choose Element->Style->New Style.
7 In Currency Setting, specify the following values:Figure 17‑18 shows the currency values you set.
Figure 17-18 Format Number showing the currency settings
Figure 17-19 Text Block showing the change in text alignment
Figure 17-20
12 In General properties of Property Editor, in Style, select crosstab_currency from the drop-down list, as shown in Figure 17‑21.
Figure 17-21Edit the column headings
When you insert a summary field, BIRT adds a label that displays the field name as a column heading. In the generated cross tab, the heading EXTENDED_PRICE appears in every column below the product line names. Because the cross tab displays values from one summary field only, the label is not necessary.
2 Select the two labels that display EXTENDED_PRICE, as shown in Figure 17‑22. These labels are directly below [PRODUCTLINE] and Grand Total.
Figure 17-22
4 Preview the report. Figure 17‑23 shows a portion of the generated cross tab.
Figure 17-23Use darker lines around the cross tab and the cells
BIRT uses two predefined styles, crosstab and crosstab-cell, to set the default appearance of the overall cross tab and the cells, respectively.
Figure 17-24 Outline view displaying the cross-tab styles
4 Right-click the crosstab style, then choose Edit Style.
Figure 17-25
9 Use the same steps to set all the cell border colors to Black, then choose OK.In the layout editor, the lines around the cells and around the cross tab appear in black, as shown in Figure 17‑26.
Figure 17-26 Cross tab design showing black borders
10 Preview the report. Figure 17‑27 shows a portion of the generated cross tab.
Figure 17-27
(c) Copyright Actuate Corporation 2008 |