Using the Southwind database, here is the output I would be looking for (where | separates the columns):
Contact Name | Company Name | Order ID | Order Date | First Name | Last Name

- Contact name & company name comes from Customers table
- Use the customerid to link to Orders table to get the order id and order date
- Use the employeeid to link to Employees table to get the first and last name.

Code:
SELECT Customers.contactname, Customers.companyname, Orders.orderid, Orders.orderdate, Employees.firstname, Employees.lastname
FROM Customers
INNER JOIN Orders ON Customers.CustomerID=Orders.CustomerID
INNER JOIN Employees ON Orders.EmployeeID=Employees.EmployeeID
ORDER BY Customers.contactname;


EDIT:
you can use a standard Grid Section based on the Orders table and lookup the other fields you require and map the values.
You should see these attributes set for PRODUCTID:

Get data mapping: keylookup("products", "productid", {}, productname)
Set data mapping: keylookup("products", "productname", "{}", productid)
Choices: select productname from products

The second parameter for KEYLOOKUP() is the name of an index tag, so make sure that you do have an index with the tagname 'orderid' on the orders table,
Code:
select orders
index on orderid tag orderid
To use the existing index tag, assuming the current value (this is what {} gives you) of the column is order_details.orderid:
Get Data Mapping: keylookup("orders","orderid_search",{},orderdate)

First test - display the customer id in the order details grid - customer id was an added blank dummy column to the table:
Choices: select customerid from orders
Get Data Mapping: keylookup("orders", "orderid_search", order_details.orderid, customerid)

Second test - display the contact name in the orders grid - contact name was an added blank dummy column to the table:
Choices: select contactname from customers
Get Data Mapping: keylookup("customers", "customerid", orders.customerid, contactname)

Finally, combine the above two get data mapping sections.
(using order_details to display then contact name - contact name was an added blank dummy column to the table)
Choices: select contact name from customers
Get Data Mapping: keylookup("customers", "customerid", keylookup("orders", "orderid_search", order_details.orderid, customerid), contactname)




http://www.lianja.com/community/show...ultiple+tables