Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One Parent, multiple types of children reporting
Message
From
14/09/1999 13:15:22
 
 
To
14/09/1999 13:02:25
Ernie Veniegas
Micro System Solutions, Inc.
Calistoga, California, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00264564
Message ID:
00264574
Views:
23
>I've completely run out of ideas for how to make this work. Can anyone help?
>
>I have a One-to-Many situation where one Parent record relates to many child records, but the child records reside in three different child tables.
>
>What I'm trying to do is print a report that shows the Parent in the header, and THREE detail sections, one for each of the three tables involved. Something like this ....
>
>MyParent Header
>-- parent data line
>-- parent data line
>
>Child Table 1
>-- data from child record 1
>-- data from child record 2
>-- data from child record 3
>-- data from child record 4
>-- data from child record 5
>
>Child Table 2
>-- data from child record 1
>-- data from child record 2
>
>Child Table 3
>-- data from child record 1
>-- data from child record 2
>-- data from child record 3
>-- data from child record 4
>-- data from child record 5
>-- data from child record 6
>-- data from child record 7
>
>I know how to do this when there's only ONE child table involved, but HOW DO YOU GET DETAILS WHEN MULTIPLE CHILD TABLES ARE INVOLVED?!? Is this even doable?
>
>I could really use some help here. Surely I'm not the first.
>
>Thanks a lot.

There are a couple of ways to approach this. One is to use Crystal Reports and create subreports for the details.

To do this all in VFP,

1) Assuming the child tables have different structures, pull all the data into a single cursor. Put multiple objects in the detail band. You'll need objects for each child. Add a flag to the cursor you create to indicate which child table the data is from and put a PrintWhen in the report objects to only print when coming from that child.

2) If the child tables have the same or similar structures and you can combine into a single cursor with common field names, create a cursor with all the data order it how you want.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform