2.2.5.2.1 Source Data

A PivotCache (section 2.2.5.2) can be based on four different types of source data. The type of source data is specified by the iSrcType field of the BrtBeginPCDSource (section 2.4.166) record.

When the source data type is a range, which occurs when iSrcType is equal to 0x00000000, the source data is read from a range specified by the BrtBeginPCDSRange (section 2.4.167) record. If the range specified by the BrtBeginPCDSRange record is a table then the PivotCache (section 2.2.5.2) has one cache field (section 2.2.5.2.2) for each column (1) of the table, using the column (1) header captions for cache field names, and the data region of the table as source data values, specified by cache records (section 2.2.5.2.10). If the range specified by the BrtBeginPCDSRange record is not a table then the PivotCache has one cache field for each column (1) of the range, using the values in the first row of the range for cache field names, and all other rows are used as source data values, specified by cache records.

When the source data type is a scenario, which occurs when iSrcType is equal to 0x00000003, no new source data is available for the PivotCache (section 2.2.5.2) and the PivotCache cannot be refreshed. A snapshot of the source data might be available in the cache records.

When the source data type is multiple consolidation ranges (section 2.2.5.2.1.1), which occurs when iSrcType is equal to 0x00000002, the source data is read from one or more ranges. For more details, see section 2.2.5.2.1.1.

When the source data type is external, which occurs when iSrcType is equal to 0x00000001, the source data is read from an external data source. The dwConnID field of the BrtBeginPCDSource record specifies the associated external connection that is used to obtain data from the external data source. An external data source can either be an OLAP or non-OLAP data source.

An OLAP PivotCache (section 2.2.5.2) is specified to be a PivotCache has an associated external connection that is an OLAP connection (section 2.2.8.3.1). For an OLAP PivotCache, the source data is handled by the data provider specified by the associated OLAP connection. See OLAP Data Model (section 2.2.5.4) for more information. An OLAP PivotCache MUST NOT have cache records (section 2.2.5.2.10).

For a non-OLAP PivotCache the source data is a rectangular set of data and the PivotCache has one cache field (section 2.2.5.2.2) for each column (1) of data, using the source field names for cache field names, and the rows of the source data as data values, specified by cache records.

When a pivot field (section 2.2.5.3.2) is on the page axis (section 2.2.5.3.7.1) of the PivotTable view (section 2.2.5.3), it is a server-based page field if the fServerBased field of the BrtBeginSXVD (section 2.4.272) record is equal to 1 and the fServerBased field of the associated BrtBeginPCDField (section 2.4.136) record is equal to 1. A server-based page field is a pivot field on the page axis (section 2.2.5.3.7.1) that causes the query that is used to retrieve source data for populating the PivotCache to be parameterized. The query is parameterized according to the page filter criteria, as specified in section 2.2.5.3.7.1. This feature can only be used for a PivotCache with ODBC external source data.