Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Environments with Crystal Reports
Message
From
15/11/1999 18:29:25
 
 
To
15/11/1999 17:32:02
Antonio Gubaira
Ingenieria Y Sistemas
Valencia, Venezuela
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00291185
Message ID:
00291332
Views:
22
>Thank you Craig for the tip. What if I want to use 2 tables (parent-child) and I need to establish relations ? SQL commands are available only for databases.

Do a SQL Select that joins the parent and child tables together, so that each record contains one parent record along with its associated parent data. You can order the records first by parent, then by child within each parent, something like:

InvHead: (InvNo, CustNo, InvDate)
InvDetl: (InvNo, Item, Qty, Price, Disc)
Select InvHead.InvNo, CustNo, InvDate, Item, Qty, Price, Disc ;
  FROM InvHead, InvDetl ;
  INTO TABLE Temp ;
 WHERE InvHead.InvNo = InvDetl.InvNo ;
 ORDER BY InvDate, CustNo, InvHead.InvNo
creates a flat file sorted by Invoice Date, then by Customer, then by Invoice, with all line item detail in a single file. Creating a report from thsi should be fairly easy.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform