Task 8: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.
Figure 17 17Change 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->New Style.Figure 17‑19 shows the currency values you set.
Figure 17 19
Figure 17 20
Figure 17 21
12 In General properties of Property Editor, in Style, select crosstab_currency from the drop-down list, as shown in Figure 17‑22.
Figure 17 22Edit 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‑23. These labels are directly below [PRODUCTLINE] and Grand Total.
Figure 17 23
4 Preview the report. Figure 17‑24 shows a portion of the generated cross tab.
Figure 17 24Use 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 25
Figure 17 26 In the layout editor, the lines around the cells and around the cross tab appear in black, as shown in Figure 17‑27.
Figure 17 27
10 Preview the report. Figure 17‑28 shows a portion of the generated cross tab.
Figure 17 28
(c) Copyright Actuate Corporation 2008 |