A simple example, taking data from Customers Transactions.
Copy the query below into the query builder.
Select Customers.cuCompany, Transactions.idxOurRef,
TransactionLines.IdxStockCode, TransactionLines.tlDescr,
TransactionLines.tlGLCode, TransactionLines.tlCostCentre,
TransactionLines.tlDepartment, TransactionLines.tlPeriod,
TransactionLines.tlYear, Transactions.thDocType, TransactionLines.tlNetVal,
TransactionLines.tlCost
From Customers Inner Join
Transactions On Customers.cuIdxAcCode = Transactions.idxAcCode Inner Join
TransactionLines On Transactions.idxFolio = TransactionLines.idxFolio
If you execute the query and go bqack to the query view it will look like the below:-
Click the 'Export Grid' to review the table view of the data:-
Now select the pivot table, Note all the fields lined up along the top:-