Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel PivotFields('field').SubTotals = Array()
Message
From
06/12/2001 11:58:10
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/12/2001 11:12:29
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00590580
Message ID:
00590606
Views:
24
This message has been marked as the solution to the initial question of the thread.
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform