PivotTable's and PivotMatrix's multiple options

Options for hiding subtotal rows and columns, showing data headers, mapping fields, headers and data cells


PivotTable::create(array(
    ...
    'hideSubtotalRow' => true,
    'hideSubtotalColumn' => true,
    'showDataHeaders' => true,
    ...
));



PivotMatrix::create(array(
    ...
    'hideSubtotalRow' => true,
    'hideSubtotalColumn' => true,
    'showDataHeaders' => true,
    ...
));
 
  dollar_sales - sum   dollar_sales - count  
  orderYear   orderQuarter  
  customerName   productLine   productName  
2004
2005
Total
Total
Total
dollar_sales - sum
dollar_sales - count
dollar_sales - sum
dollar_sales - count
dollar_sales - sum
dollar_sales - count
AV Stores, Co.
Total
Amica Models & Co.
Total
Anna's Decorations, Ltd
Total
Alpha Cognac
Total
Atelier graphique
Total
Total
$99,984
35
$0
0
$99,984
35
$82,223
26
$0
0
$82,223
26
$0
0
$56,932
19
$56,932
19
$0
0
$12,432
5
$12,432
5
$7,743
3
$0
0
$7,743
3
$189,951
64
$69,365
24
$259,315
88
Page size:

This example shows new features of Pivot table:

  1. Hide Sub Total Rows: By default, pivot showing sub total for each data group which is very useful but could take some space. If you do not like this default option, you may set "hideSubtotalRow" to true to turn off this feature.
  2. Hide Sub Total Columns: The same as hiding the sub total rows, you may hide the sub total columns in pivot table by settings