Microsoft Office Tutorials and References
In Depth Information
20.9.7 ShowDetail Property
This read-only property returns the number of records in the PivotTable cache that contain the
pivot item. For instance, the code:
ActiveSheet.PivotTables("Sales&Trans"). _
PivotFields("Store Type"). _
PivotItems("Franchise").RecordCount
will return the number 80 because there are 80 rows in the source table (and, hence, the pivot
cache) that involve the Franchise store type.
20.9.7 ShowDetail Property
When this read-write property is set to True , the pivot item is shown in detail; if it is False , the
PivotItem is hidden. To illustrate, consider, as usual, the pivot table in Figure 20-10 . The code:
ActiveSheet.PivotTables("Sales&Trans"). _
PivotFields("Store City"). _
PivotItems("Boston").ShowDetail = False
results in the pivot table in Figure 20-39 . As we can see, the Transactions and Sales for Boston are
summed over all (both) store types (Company and Franchise).
Figure 20-39. Illustrating ShowDetail
Unfortunately, there seems to be a problem when the ShowDetail method is applied to inner pivot
items. For instance, the code:
ActiveSheet.PivotTables("Sales&Trans"). _
PivotFields("Store Type"). _
PivotItems("Company").ShowDetail = False
does seem to set the ShowDetail property to False , as can be verified by the code:
MsgBox ActiveSheet.PivotTables("Sales&Trans"). _
PivotFields("Store Type"). _
PivotItems("Company").ShowDetail
 
 
Search JabSto ::




Custom Search