select * from customer c ; join orders o on c.cust_id=o.cust_id into cursor crsReport report form CustOrders previewI could follow this with a report form to get what I want. I could extend it with a where clause. Up till now no superiority to a report with DE tables. Think for a moment you needed the same exact report but using totally different tables even with different field names (but report would be same and using say fields cust_id, company, order_id,order_date). I have this exact situation in real world app where there are too many reports with mostly only tables are changing (and criteria). In final product I have many cursor preparing routines but few frxes.
select myId as cust_id, ; myComp as Company, ; myOId as Order_id, ; myDate as order_date ; from myClients c join myInvoices i on c.myId = i.compid ; into cursor crsAnother report form CustOrders previewIOW we strip data source from report definition. Using SQLs for report is a nice flexible way. But it doesn't matter if you wanted to use tables with relations only. If they're in form.de already just select the main (parent) and run report. If not you could set up new tables relations and fire report. Even temporarily you could start a new private datasession in a routine, set up tables, report and end session. All these flexibility is rendered useless if table is in report.DE. Wish VFP never supported it but I think it's a matter of backward compatibility to fox2x.