Pivot Grid

The pivot grid control represents dynamic data (obtained from the underlying data source) in a cross-tabulated form to create cross-tab reports, similar to Pivot Tables in Microsoft Excel®. Column headers display unique values from one data field, and row headers - from another field. Each cell displays a summary for the corresponding row and column values. By specifying different data fields, you can see different totals. This allows you to get a compact layout for a complex data analysis.

The pivot grid has a designer which allows you to easily adjust its layout. It can be opened using the control's Smart Tag.

Open the grid designer

In the Property Grid, the pivot grid's properties are divided into the following groups.

Appearance

Property Description
Appearance Allows you to define the appearance properties (such as background color, foreground color, font, etc.) for the pivot grid's elements (cell, field value, filter separator, header group line, etc.).
Formatting Rules Opens the Formatting Rules Editor allowing you to choose which rules should be applied to the control during report generation, and define the precedence of the applied rules. To learn more on this, see Conditionally change a control's appearance.
Styles Allows you to open the Styles Editor, which is intended to manage and customize the control's styles, which then can be assigned to the pivot grid's elements.

Behavior

Property Description
Anchor Horizontally Specifies the horizontal anchoring style of the pivot grid, so that after page rendering it stays attached to the left control, right control, or both.
Anchor Vertically Specifies the vertical anchoring style of the pivot grid, so that after page rendering it stays attached to the top control, bottom control, or both.
Keep Together Specifies whether the contents of the control can be horizontally split across pages. In other words, if the control occupies more space than remains on the page, this property specifies whether this pivot grid should be split between the current page and the next, or whether it will be printed entirely on the next page. This property is in effect only when a pivot grid's content does not fit on the current page. If it does not fit on the next page either, then the pivot grid will be split despite this property's value.
Scripts This property contains events, which you can handle by the required scripts. For more information on scripting, see Handle events via scripts.
Visible Specifies whether the control should be visible in Print Preview.

Data

Property Description
Data Adapter Determines a data adapter that will populate a pivot grid's data source which is assigned via the Data Source property. It is automatically set to the appropriate value, when the Data Member property is defined.
Data Member

Determines the data source member which supplies data to a pivot grid.

Note: Usually, it is not necessary to specify the Data Member property when binding a pivot grid to data. This property should only be set directly if the data set contains more than one table.

Data Source Determines the pivot griddata source.
Fields Opens the Pivot Grid Field Collection Editor, allowing you to manage and fully customize a pivot grid's fields.
OLAP Connection String

Specifies a connection string to a cube in a Microsoft Analysis Services database. A sample connection string is shown below:

OLAPConnectionString="Provider=msolap;Data Source=localhost;Initial Catalog=Adventure Works DW;Cube Name=Adventure Works;Query Timeout=100;"

A connection string can be built via the Connection String Editor. To open it, click on the ellipsis button for the OLAP Connection String property.

To represent information from the bound cube, create specific pivot grid fields, and bind them to the required fields in the data source.

If the OLAP Connection String property is set to a valid string, the value of the Data Source property is cleared. Setting the Data Source property to a valid object clears the OLAP Connection String property.

Prefilter

When this property is expanded in the Property Grid, you can set its Enabled property to Yes, and use the Criteria property to open the Pivot Grid Prefilter dialog.

This dialog allows you to build complex filter criteria with an unlimited number of filter conditions, combined by logical operators. It provides a set of logical operators that significantly simplify the process of creating filters for text, numeric and date-time fields.

Note: The Prefilter is not supported in OLAP mode.

Design

Property Description
(Name) Determines a control's name, by which it can be accessed in the Report Explorer, Property Grid or via scripts.

Layout

Property Description
Location Specifies the control's location, in report measurement units.
Size Specifies the control's size, in report measurement units.
Snap Line Margin Specifies the margin (in report measurement units), which is to be preserved around the control when it is aligned using Snap Lines, or when other controls are aligned next to it.

Navigation

Property Description
Bookmark and Parent Bookmark These properties are intended for the creation of a hierarchical structure within a report called a document map. For an explanation and help, see Add bookmarks.

Options

Property Description
Data Field Options Allows you to customize the options which control the presentation of the data fields.
Data Options Allows you to define whether a pivot grid's fields must be case sensitive or not.
Chart Data Source Options Provides access to the options controlling the display of the pivot grid's data in a chart.
Print Options Allows you to customize the print options of a pivot grid.
View Options Allows you to customize the pivot grid's display options.