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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using the pivotfields("field").subtotals on VFP 6

Status
Not open for further replies.

arides

IS-IT--Management
Nov 19, 2002
21
AR
hi, im having problems with the .subtotals property. im using the excel object on VFP 6, i tried every variation i could come up but with no result.

can anyone help?
 

What code are you using? What exactly is the problem. Is thre an error message?


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
this is an example of what i've been tryin

im working on a class that receives FIELD and SUMUP

field is the name of the pivotfield i want to modify, SUMUP is a boolean. tried that as a text too, but to no avail

opivottable.pivotfields(&field).subtotals(2) = sumup

I created opivottable this way:

dimension aSource[2]

oExcel = createobject("excel.application")
oExcel.Application.Visible = .T.
oWorkbook = oExcel.Workbooks.Add()
oTargetSheet = oWorkbook.Sheets.Add()
oTargetRange = oTargetSheet.range("A2")

aSource[1] = "Driver={Microsoft Visual FoxPro Driver};" +;
"SourceDB=" + dirorigen + ";SourceType=DBF;"
aSource[2] = "select * from archplano"
oPivotTable = oExcel.Sheets[1].PivotTableWizard( 2,;
@aSource, oTargetRange, "PivotTable", .T., .T. )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top