Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

11.08 Style Properties

Formatting the Style Properties

The grid has some unique formatting properties that don’t appear with other objects. These are called the Style properties. Right-click on the cross-tab object and select Cross-Tab Expert. The Cross-Tab tab is shown by default and this has already been discussed earlier. Click on the Style tab, the second tab, to choose from a list of more than a dozen predefined styles. As you click on each style, the right window shows a template of how your cross-tab object will be formatted.

Click on the Customize Style tab to make your own changes to the style. If you selected a predefined style in the previous tab, you will be prompted about whether you want to save that style. If you choose Yes, then the new style will be reflected on the Customize Style tab. If you choose No, then the Customize Style tab will reflect the formatting of the cross-tab object before you opened the Cross-Tab Expert.



Figure 11-9. The CustomizeStyle tab of the Format Cross-Tab expert.

The Customize Style tab has numerous properties that you can use to format the cross-tab grid to look exactly like you want. There is a Rows window and a Columns window and within each window are the names of the grouping fields. Click on the field you want to format to change its properties. The properties and their descriptions are listed in the Group Options frame directly below those windows. Each of these properties only affects the group field that is currently selected. These style properties are listed in Table 11-2.

Table 11-2. Style formatting properties for cross-tab group options.

Style Property Description
Suppress Subtotal When you have multiple groups for a row or column, the cross-tab grid shows a subtotal for the top-most groups. This suppresses that subtotal from printing.
Suppress Label This suppresses all data for that field from appearing in the cross-tab grid.
Alias for Formula This changes the name that you use to reference the group in the conditional formatting formulas.
Background Color Sets the background color for the cell.

At the bottom of the dialog box is a frame titled Grid Options. The properties listed in this frame apply to the entire cross-tab. These grid options are listed in Table 11-3.

Table 11-3. Grid options for the cross-tab object.

Grid Option Description
Show Cell Margins By default, each group field has a margin surrounding it. Turning this off makes the edge of the group field flush with the grid lines.
Indent Row Labels The row labels can be indented so that they are offset from the Total row. This makes it easier to notice the Total row and it makes your report appear more professional. When this is checked, you can specify the indentation in inches.
Repeat Row Labels When there are too many columns to fit on a single page, they will span across to the next page. Setting this option on causes the row values to be printed on the additional pages. This option is only available if you have the Keep Columns Together option enabled.
Keep Columns Together Select this option (it is selected by default) to force columns that span multiple pages to stay intact. Unselecting this option could cause a column to be split in half.
Row/Column Totals on Top Forces totals to be switched from their default position. Row totals will be at the top-most row and column totals will be left-most column.
Suppress Empty Rows/Columns Don’t print rows/columns with no data.
Suppress Row/Column Grand Totals Don’t print the grand-totals for rows and/or columns.

The Format Grid Lines button is used to set the line styles for the grid. Clicking on this button brings up the Format Grid Lines dialog box shown in Figure 11-10. For each grid line in the cross-tab object, you can set the color, style, and width properties. You can also suppress a line by unchecking both Draw options. If you don’t want any grid lines to be shown then uncheck the Show Grid Lines option.



Figure 11-10. The Format Grid Lines dialog box.