2.2.5.3.9 PivotTable Rules

A PivotTable rule can be used to identify cells in a PivotTable (section 2.2.5) report. A PivotTable rule is specified by the sequence of records that conforms to the PIVOTRULE (section 2.1.8) or PIVOTRULE14 rule (as defined in section 2.1.7.40). Each PivotTable rule references a specific area of a PivotTable report, pivot fields (section 2.2.5.3.2), the data field (section 2.2.5.3.7.5.2), or cache fields (section 2.2.5.2.2) and optionally corresponding pivot items (section 2.2.5.3.3), data items (section 2.2.5.3.7.5.1), or cache items (section 2.2.5.2.3) associated with cells in a PivotTable report. When cache items are referenced, the PivotTable rule references calculated items (section 2.2.5.2.6) associated with those cache items.

Each sequence of records that conforms to the PRFILTER (defined in section 2.1.8) or PRFILTER14 rule (as defined in section 2.1.7.40) in the PIVOTRULE or PIVOTRULE14 rule (respectively) specifies a set of pivot items (section 2.2.5.3.3), data items (section 2.2.5.3.7.5.1), or cache items for an individual pivot field (section 2.2.5.3.2), data field, or cache field. This set of pivot items, data items, or cache items is specified by the sequence of records that conforms to the PRFITEM (section 2.1.8) or PRFITEM14 rules (as defined in section 2.1.7.40) within the PRFILTER or PRFILTER14 rule, respectively.

The pruleheaderdata.fCacheBased field in the BrtBeginPRule (section 2.4.185) record specifies whether the PivotTable rule specifies cache items (section 2.2.5.2.3). The pruleheaderdata.isxvd field in the BrtBeginPRule and BrtBeginPRule14 (section 2.4.186) records specifies whether the PivotTable rule specifies pivot items (section 2.2.5.3.3), or data items (section 2.2.5.3.7.5.1) as follows:

  • If pruleheaderdata.fCacheBased field in the BrtBeginPRule record equals 1, then this PivotTable rule references cache items. The pruleheaderdata.fCacheBased field in the BrtBeginPRule14 record equals 0.

  • If the pruleheaderdata.fCacheBased field in the BrtBeginPRule record equals 0 and the record is a BrtBeginPRule14 record and the pruleheaderdata.isxvd field in the same BrtBeginPRule or BrtBeginPRule14 record equals -2, then this PivotTable rule references the data field (section 2.2.5.3.7.5.2).

  • If the pruleheaderdata.fCacheBased field in the BrtBeginPRule record equals 0 and the record is a BrtBeginPRule14 record and the pruleheaderdata.isxvd field in the same BrtBeginPRule or BrtBeginPRule14 record does not equal -2, then this PivotTable rule references pivot items.

Cells that are associated with any pivot item, data item (section 2.2.5.3.7.5.1), or cache item (section 2.2.5.2.3) from an individual PRFILTER (defined in section 2.1.8) or PRFILTER14 rule (as defined in section 2.1.7.40) and that meet restrictions specified by the corresponding BrtBeginPRFilter (section 2.4.179) or BrtBeginPRFilter14 (section 2.4.180) record are associated with this PRFILTER or PRFILTER14 rule, respectively.

Cells that are associated with every PRFILTER (defined in section 2.1.8) or PRFILTER14 rule (as defined in section 2.1.7.40) of the PIVOTRULE (section 2.1.8) or PIVOTRULE14 rule (as defined in section 2.1.7.40) (respectively) are associated with the PRFILTERS or PRFILTERS14 rule (respectively) in the PIVOTRULE or PIVOTRULE14 rule (respectively). Cells that are associated with the PRFILTERS or PRFILTERS14 rule (as defined in section 2.1.7.40) in the PIVOTRULE (section 2.1.8) or PIVOTRULE14 rule (respectively) and that meet the restrictions specified by the corresponding BrtBeginPRule (section 2.4.185) or BrtBeginPRule14 (section 2.4.186) record are the cells specified by the PivotTable rule (section 2.2.5.3.9).

A cell is associated with a particular cache item (section 2.2.5.2.3) if it is associated with the pivot item (section 2.2.5.3.3) that has an association with that cache item.