WITH THISFORM._PIVOTTABLE .cAlias = ALIAS() .cDBCName = DBC() .cDBCTable = DBF() .cpivfldrow = ("sex") <----------------------here .lHasColumnTotals = .T. .lHasRowTotals = .T. =ACOPY(aflds,.aAutoFields) =ACOPY(aFList,.aFldList) .MakeOutput() ENDWITHBut i can't add two fields into the pivot table, it always show error although i can visually in the excel. Can anybody tell me how to solve this?