//Unshowing grand totals for rows.
pivotTable.setRowGrand(false);
//Dragging the first field to the row area.
pivotTable.addFieldToArea(PivotFieldType.ROW,0);
//Dragging the second field to the column area.
pivotTable.addFieldToArea(PivotFieldType.COLUMN,1);
//Dragging the third field to the data area.