Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Tamar Granor
  Where is Tamar Granor?
 Elkins Park
 Pennsylvania - United States
 Tamar Granor
 To: Barak Ros
  Where is Barak Ros?
 TLV
 Israel
 Barak Ros
 Tags
Subject: RE: relations
Thread ID: 310873 Message ID: 310987 # Views: 35 # Ratings: 2
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Monday, June 27, 2011 10:51:16 PM         
   


> hi
>
> I need to set relation between a father table and 2 sons tables, so I can print a report that shows for each father row , the rows related to it in the 2 sons tables.
>

Barak - this is much easier in VFP 9, but if you have to do it in VFP 6, check out the section title "Reporting on one parent table and all its child tables" in this article (http://www.tomorrowssolutionsllc.com/Materials/SQLProblems.PDF) on my website.

I saw farther down the thread that your child table structures are different from each other. To handle that, you can set up fields in the combined cursor that come from only one table or the other and then use Print When conditions in the report. The report itself will be ugly, but it'll work.

Tamar

ENTIRE THREAD

relations Posted by Barak Ros @ 6/26/2011 3:24:06 PM
RE: relations Posted by Samir H. @ 6/26/2011 4:14:09 PM
RE: relations Posted by Barak Ros @ 6/26/2011 4:26:38 PM
RE: relations Posted by Samir H. @ 6/26/2011 4:32:56 PM
RE: relations Posted by Barak Ros @ 6/26/2011 4:38:23 PM
RE: relations Posted by Samir H. @ 6/26/2011 5:05:51 PM
RE: relations Posted by Tamar Granor @ 6/27/2011 10:51:16 PM