Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report on two child tables
Message
From
18/12/1997 08:58:06
 
 
To
17/12/1997 19:58:01
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00066705
Message ID:
00066872
Views:
36
>>>I have a parent table which has applicant name, and social security number. I also have two child tables, one has universities attended, date of attending, and degree; the other one has honor, and date of honor. I need to create a report which the following format.
>>>
>>>Applicant name: XXX SS No.: xxx-xx-xxxx
>>>----------------------------------------------
>>>EDUCATION
>>>1986-1990 U. of Nowhere BSc.
>>>1990-1992 U. of Nowhere MPhil.
>>>
>>>HONOR
>>>1990 Outstanding Student
>>>1991 Dean's List
>>>1992 Outstanding Student
>>>
>>>Therefore, I need to print out all the records on education table first, and then all the records on honor table. From the reprot designer, it seems to me that I cannot accomplish the above task. Can anyone help? Thanks.
>>>
>>>Chu
>>
>>Firstly, you 'concatenate' two table into one cursor:
>>Select 1 as listorder,field1,field2,field3,space(10) as field4,space(10) as field5 From table1 Into cursor tmpReport ;
>>Union Select 2 as listorder "" as field1,"" as field2,"" as field3, field1 as field4, field2 as field5 From table2
>> Now, you create report form grouped by listorder. All report fields should 'Print When' feature to distinct between listorder values.
>
>I am a bit confused. Should I create erport form grouped by social security number instead of listorder? I am a beginner on the report. Thanks.
>
>Chu

It was idea how to handle one parent record. For all parent record you have to:
1. Add 'ssno' field into Select..Union command
2. Join parent record to tmpReport to final cursor.
3. Group report form by ssno,listorder.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform