Newbies pdw Posted September 10, 2010 Newbies Posted September 10, 2010 Hey, I have a problem with making a report, containing an self-joining relation. My real problem can be translated in this simple example. You have a company with employees. There names are stored in table EMPLOYEES. The content is: Emp1, Emp2, Emp3 and Emp4. Each employee is managed by an other one. This data is stored in table MANAGING. The table consist out of two fields each containing a related name out of table EMPLOYEES. The fields are: "Emplyee" and "Managed by" An example input can be: "Employee" "Managed by" Emp2 Emp1 Emp2 Emp4 Emp3 Emp2 What I want is printing a report with the following structure. <> "Managers of him" <> "Manage others" <> For my example this will give: Emp2 "Managers of him" Emp1 Emp4 "Manage others" Emp3 I want actually a report that shows all unrolled relationships in the table. Note: The problem can be solved with portals, but using an portal is not what I expect, because the portals can't scale automatically with the amount of data. The report needs to be printed. Thank you for helping
wireshop Posted September 10, 2010 Posted September 10, 2010 I think what you will need are two sub-summary parts in your layout. Your layout will be based on the EMPLOYEES table. One sub-summary part will be for the "managed" employees. The other sub-summary part will be "managed by". You will need two separate TOs. By the way I would not put the structure data in a separate table. Just add an extra field to your employees table that contains the ID of who manages them. BTW the logic to make this work is similar to a two-level BOM see: http://fmforums.com/forum/showtopic.php?tid/142035/post/142068/#142068
comment Posted September 10, 2010 Posted September 10, 2010 "Employee" "Managed by" Emp2 Emp1 Emp2 Emp4 Do you really have employees that are managed by more than one person?
Recommended Posts
This topic is 5186 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now