Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel PivotFields('field').SubTotals = Array()
Message
From
06/12/2001 12:07:00
 
 
To
06/12/2001 11:58:10
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00590580
Message ID:
00590611
Views:
24
Thanks Cetin - you da man! I was trying to set all 12 of the array indexes to False when all I need was the first. That did the trick, thanks again.

>>By default a pivottable will create subtotals for all the groupings. In one of my reports I want to turn off subtotals. I recorded a macro in Excel and it returned the following code:
>>
>>
>>ActiveSheet.PivotTables("PivotTable").PivotFields("sub_cntry").Subtotals = _
>>  Array(False, False, False, False, False, False, False, False, False, False, False, False)
>>
>>
>>I tried the following two workarounds but the first will not compile and the second returns an error:
>>
>>
>>
>>DIMENSION laSubTotals[12]
>>laSubTotals = .F.
>>WITH oExcel.PivotTables("PivotTable")
>>   .PivotFields("sub_cntry").SubTotals = @laSubTotals  && won't compile
>>
>>   .PivotFields("sub_cntry").SubTotals( @laSubTotals) && OLE error
>>ENDWITH
>>
>>
>>Anyone got a solution?
>
>Hi Tom,
>Try this :
>
>.PivotFields("sub_cntry").SubTotals(1) = .t.
>.PivotFields("sub_cntry").SubTotals(1) = .f.
>
>Cetin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform