Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grandfather/Parent/Child Report?
Message
From
19/03/1999 13:09:28
 
 
To
19/03/1999 12:50:01
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00199814
Message ID:
00199853
Views:
63
>Okay. First, if you are going to code the SKIP than don't set the relation one2many property (just a hunch).
>
>Second. How are you issuing the SET SKIP?
>
>I.E.
>Select grandparent
>SET SKIP TO child, grandchildren ? Or, are you set skip to in the parent and in the grandparent? If you post your code that would be ford.
>
>Finally, reports don't have an init method...are you setting this up in the form and then calling the report? If so then the report's de should be empty, I believe.
>
>I wouldn't do anything with groups til you get your relation working (JMO).
>
>>Thanks for your response. Yes, I've checked the relations, and the OneToManyProperty. What concerns me is this, taken from the VFP 5.0 documentation: "The OneToMany property can be used to specify the record pointer movement in a simple parent-child table relationship. To specify the record pointer movement in a more complex relationship (for example, a grandparent-parent-child relationship), use SET SKIP in the Init method for the Form or report." That seems to imply that the OneTOMany propery won't hack it for what I need to do. However, my attempts to use SET SKIP the the init event of the report haven't worked either. I've also experimented with different grouping levels in tandem with the SET SKIPs, but alas. . . no luck.


I wasn't sure what Microsoft meant by "the Init method for the Form or report" either, since I've never heard of an Init event firing for a report. I assumed that they meant the init event of the data environment, so I used the following code there:

select grandfather
set relation to supermkt into parent

select parent
set relation to market_ind into child1
set relation to supermkt into child2 additive
set skip to child1, child2
select grandfather

(This is exactly the code I'm using; I've only changed table names to make it easier to read.)

There is a one-to-one relationship between grandfather and parent, and one-two may relationships between the parent and each of the children. I tried setting the OneToMany property to False and True for all tables, with and without the code in the init event.

I noticed that if I did not select grandfather at the end of the Init code, the report wouldn't work properly at all. I'm assuming this is related to the InitialSelectedAlias Property of the Data Environment.

Thanks for all your help.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform