Table Style Rules

When using Tables in reports, it is useful to apply styles to the data so they stand out apart from the rest of the data. Rules can be applied at the Row Level or at the Column level. These rules will override the general or default table settings applied in the table tool, based on conditions set for each rule.

Accessing the Styling Rules Editor

There are two types of rules and there is a control button for each rule type.

Column Rules: are applied to an individual field in the table. When a column rule is applied, the field the rule is applied to will appear in bold in the configuration window. Column Rules are accessed in the Per Column Configuration of the Table Properties Window. To apply a Column Rule:

  1. Click the field name to apply the rule to.
  2. Click the Create/Edit Button to set the parameters of the rule.

Row Rules: are applied to the entire row of data in a table (such as highlighting a Total row). Row Rules are accessed from the bottom of the Table Properties Window. To apply a Row Rule:

  1. Click the Create/Edit Row Rule button to set the parameters of the rule.

To apply a Rule to the Table, the button may read one of two ways:

Configuring the Styling Rules Editor

Rule Names: Rules that are currently being applied either per column or per row appear in the top section of the editor. To edit an existing rule, highlight the rule to edit. Options include:

When specifying a Row Rule, an additional checkbox is present allowing the user to specify whether that rule should override an existing Column Rule. Rule Hierarchy is discussed below.

Styles: The Styles section is where the user applies the styling options that are applied to the data if the condition specified above is met. Options include:

Formula Styles: Advanced option - When the basic style overrides are insufficient, users can create their own style overrides, by writing a formula which constructs CSS-like style text. This formula is computed individually for each cell to which it applies, and can be very powerful. Use of this requires a solid understanding of CSS styles and some knowledge of PCXML and Composer.

Some Common PCXML properties to use within formulas:

Rule Hierarchy

Using rules effectively requires understanding which rules comes first, and which ones override other ones. When two rules intend to change different styles (one changing a font, and the other changing the font size, for example), it doesn't matter which one executes first. But when two rules both intend to change the same style, only one them will win. Rules are executed in the following order, with later rules overriding earlier rules.

Here is another way to look at this.

Related Topics Link IconRelated Topics