>Hello,
>
>I've just started using VFP 6.0 and run into a problem :
>
>I desperately want to make a small report on 18 tables, all with different structures.
>The user can select as many tables as he/she wants (upto 18) in a Form and then the program will make a report out of the selected tables. The report will show data from 2 or 3 fields from each selected table.
>
>The problem is:
>How can I get the data from the selected tables into one table which I can use for the report?
>
>Could you please give me some code and a simple answer, since I'm a novice VFP user.
>
>Thank you very much for your time and answer in advance.....
Remco, the usual way for this is to create the report cursor from the SQL SELECT statement. Your tables should have the key fields which will identify the records for selection. Something similar to:
SELECT customer .company, orders.order_date, orders.shipped_on ;
FROM customer , orders ;
WHERE customer.cust_id = orders.cust_id ;
INTO cursor _creport
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison