September 10, 201015 yr Newbies 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
September 10, 201015 yr 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
September 10, 201015 yr "Employee" "Managed by" Emp2 Emp1 Emp2 Emp4 Do you really have employees that are managed by more than one person?
Create an account or sign in to comment