Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Array() from VFP to Pivot table 1

Status
Not open for further replies.

LouShepherd0921

Programmer
Mar 14, 2006
2
Hello all -

I'm developing an Excel Pivot Table app in Visual FoxPro 9 and so far, it's working out fine - with 1 exception.

I was reading that it is possible to roll up date fields into months, quarters, years etc with a VBA line like this:

PT.PivotFields("Balance Date").LabelRange.Group Start:=True,_
End:=True, Periods:=_
Array(False, False, False, True, True, True)

I understand that the ":=" signifies a named parameter, so in VFP9 I could write:

PT.PivotFields("Balance Date").LabelRange.Group.Start = .T.
PT.PivotFields("Balance Date").LabelRange.Group.End = .T.

BUT

How can I pass the Array() stuff? It keeps throwing errors.

Thanks,
Lou

 
Not tested but:
Code:
LOCAL ARRAY testArr[7]
STORE .t. TO testArr[4], testArr[5], testArr[6], testArr[7]
PT.PivotFields("Balance Date").LabelRange.Group(.t.,.t.,,@testArr)

Borislav Borissov
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top