[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotTable.PageFieldWrapCount

PageFieldWrapCount Property

PageFieldWrapCount

Gets or sets the number of page fields displayed in each column or row of the PivotTable report.

This value determines how page fields are wrapped in the report filter area when the PivotTable contains multiple page fields. Use PageFieldWrapCount to change the layout.

Declaration
int PageFieldWrapCount { get; set; }
Property PageFieldWrapCount As Integer
Examples
worksheet.Range["A1:D5"].Value = new object[,] {
    {"Region", "Product", "Quarter", "Amount"},
    {"East", "Apple", "Q1", 120},
    {"East", "Pear", "Q2", 95},
    {"West", "Apple", "Q1", 80},
    {"West", "Pear", "Q2", 110}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:D5"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["F1"], "SalesPivot");
pivotTable.PivotFields["Region"].Orientation = PivotFieldOrientation.PageField;
pivotTable.PivotFields["Quarter"].Orientation = PivotFieldOrientation.PageField;
pivotTable.PageFieldWrapCount = 1;
int wrapCount = pivotTable.PageFieldWrapCount;