Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grandfather/Parent/Child Report?
Message
From
19/03/1999 13:57:35
 
 
To
19/03/1999 13:21:15
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00199814
Message ID:
00199890
Views:
66
>Yes, you do need to make sure the grandfather is selected. A relation only has meaning from the parent of it.
>
>Try to set the skip to child1, child2 (you can do it one line I seem to remember) from the Grandfather.
>
>Gee, I guess I have really moved away from Set relations to p-views. I used to know relations "cold." ;)
>
>>
>>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.


Nancy, thanks so much--I finally got it right. For reasons I haven't yet determined, when I actually USE the tables in the Init event of the Data Environment, everything works as expected. Now, instead of adding the tables to the data environment, I simply leave the data environment empty, and USE each table through code and then use SET RELATION and SET SKIP. I'm guessing that the tables had some properties set in the Data Environment that were preventing the SKIPping from working. As time permits, I'll investigate more, but at least I've gotten done what I needed to do (that's important on Friday afternoons) and learned a new technique in the process. I appreciate your help.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform