CollapsePivotTable Class

NReco.PivotData Class Library Documentation
Pivot table wrapper that collapses all groups except ones that are explicitely expanded.
Inheritance Hierarchy

SystemObject
  NReco.PivotDataCollapsePivotTable

Namespace:  NReco.PivotData
Assembly:  NReco.PivotData.Extensions (in NReco.PivotData.Extensions.dll) Version: 1.5.3
Syntax

public class CollapsePivotTable : IPivotTable

The CollapsePivotTable type exposes the following members.

Constructors

  NameDescription
Public methodCollapsePivotTable
Initializes a new instance of CollapsePivotTable instance by specified CollapsePivotTableConfiguration.
Top
Properties

  NameDescription
Public propertyColumnKeys
Public propertyColumns
Public propertyPivotData
Public propertyRowKeys
Public propertyRows
Top
Methods

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodGetValue
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
Remarks

Use this class if you need to prepare pivot table data model where only some groups are expanded. Usually it is used for exports and canned reports.

NOTE: do not use this wrapper for interactive web pivot table where user can expand/collapse groups: for this purpose PivotTableHtmlWriter implements this functionality in a special way (see ).

Examples

PivotTable originalPvtTbl;
var collapsedPvtTbl = new CollapsePivotTable(originalPvtTbl, 
  new CollapsePivotTableConfiguration() {
    // expand:
    // - 1st (index=0) group of the 1st dimension on rows
    // - 3rd (index=2) group and its 1st (index=0) sub-group
    ExpandedRows = new int[][] { new int[] { 0 }, new int[] { 2, 0} }
  }
);
See Also

Reference