SideLabel object, TopLabel object
Returns an additional row or column containing the total for a top label or side label object. This is like selecting a pivot side label column or top label row and selecting Add Totals from the Pivot menu.
All collections have the “Item(NameOrIndex)” method. This is the default method for all collections that returns collection items at a particular index or by name. Use brackets ([]) to represent calls to the Item (Method). For example, these statements are identical: myItem = Documents[1] myItem = Documents.Item(1) myItem = Documents["StartUp.bqy"] myItem = Documents.Item("StartUp.bqy") |
This example shows how to add a Totals column (using the default data function of “sum”) for the “Product Line” from the Totals collection or from the TopLabels collection:
ActiveDocument.Sections["SalesPivot"].TopLabels["Product Line"].Totals.Add() or ActiveDocument.Sections["SalesPivot"].TopLabels["Product Line"].AddTotals()
This example shows how to determine the average using the data function property and the totals collection: