Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 6.0 - Report designer
Message
From
18/03/1999 14:46:57
 
 
To
16/03/1999 16:30:04
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00198320
Message ID:
00199412
Views:
29
I just wanted to thank you for your time, it's working! If you were a girl I would send you a kiss :)

>OK, sorry, misread. Try this:
>
>SELECT parent.id,child.*,"CHILD1" as tableID FROM parent,child WHERE child.parentkey = parent.primarykey UNION SELECT ;
>SELECT parent.id,child2.*,"CHILD2" as tableID FROM parent,child2 WHERE child.parentkey = parent.primarykey UNION SELECT ;
>SELECT parent.id,child3.*,"CHILD3" as tableID FROM parent,child3 WHERE child.parentkey = parent.primarykey UNION SELECT ;
>SELECT parent.id,child4.*,"CHILD4" as tableID FROM parent,child4 WHERE child.parentkey = parent.primarykey INTO CURSOR xxx
>
>
>Or, you could create a SELECT with 3 LEFT JOIN's which would create a table where all child fields are in each result row as id,id_1,id_2 unless you used the AS clause to give them specific names.
>
>What I'm unsure about (I don't have VFP access right now) is if VFP allows multiple UNIONs...
>
>
>
>
>
>>I don't see a reference to my other THREE child tables, just the first one. Can you tell me what do I do to get the records from the other three and print them on the report like this?
>>
>>PARENT (ONE RECORD)
>>CHILD1 (ALL RECORDS THAT MATCH)
>>CHILD2 (ALL RECORDS THAT MATCH)
>>CHILD3 (ALL RECORDS THAT MATCH)
>>CHILD4 (ALL RECORDS THAT MATCH)
>>
>>
>>>Sure!
>>>
>>>SELECT parent.id,child.* FROM parent,child WHERE child.parentkey = parent.primarykey INTO CURSOR ORDER BY parent.id,child.id xxx
>>>
>>>Then use xxx for reporting and print the Parent ID in a Summary band.
>>>
>>>
>>>>I have a PARENT table and four CHILD tables:
>>>>PARENT, CHILD1, CHILD2, CHILD3 & CHILD4
>>>>
>>>>I want to print ONE record from the PARENT table and then all the records that match in the CHILD1 table, then CHILD2, then CHILD3 and CHILD4.
>>>>
>>>>PARENT (ONE RECORD)
>>>>CHILD1 (ALL RECORDS THAT MATCH)
>>>>CHILD2 (ALL RECORDS THAT MATCH)
>>>>CHILD3 (ALL RECORDS THAT MATCH)
>>>>CHILD4 (ALL RECORDS THAT MATCH)
>>>>
>>>>Is there any way to do this in VFP?
>>>>Thank you in advance.
Previous
Reply
Map
View

Click here to load this message in the networking platform