April 18, 200718 yr Hope this is the right section of the forum to post this.. I have a Category table. Each table has a optional parentID which refers to the CategoryID of its parent. I need to create a layout, suitible for printing. It needs to show the first category, then its child categorys, then the second category,... My question: 1. how can I say which category is the first to be printed? 2. how to show the child category's after each row? I think I will need to change or add some fields to the table, no?
April 18, 200718 yr Your image doesn't quite show enough. What is this table linked to? Is the ParentID linked to a different record in this same table? Let us assume for the moment that it is so... In order to manage the Parent-Child in this situation, your Relationship graph will have two separate copies of the Category table. For this discussion, I will call the first one ParentCat and the second ChildCat. These Table Occurrences will be related: ParentCat::CatID <-> ChildCat::ParentID If you build a summary report on the ChildCat table, sorting by ChildCat::ParentID, you can include a header for the info in ParentCat that will repeat for each Parent, after which each ChildCat will display. You can use the relationship to sort the children in your preferred order, or you can use a script to find, sort, and display your report. HTH, David
April 19, 200718 yr Author I'll try it your way. No, I just have this table. I have a very big database and I try to keep it as small as possible. I'm a newbie, but have the feeling that FileMaker can become very crowded when you always need to create new occurences of tables.
April 24, 200718 yr Adding table occurences doesn't increase the size of your database by very much at all. You say this is the only table, but I can see in your image that you have relationships from this table's CategoryID and SellerID (since they are listed above in the TO, and the fields themselves are italicized)--not to mention I see both the hint of another table behind the one you target and a couple of stray relationship lines that suggest tables on other parts of your graph. This is not a problem, but it underscores that there are other tables & relationships on your graph, which might affect the solution to your question. BTW, normalizing a database by splitting information out into separate tables can result in *smaller* files, since you re-use a single entry from a related table, rather than repeating the same info over and over again. David
Create an account or sign in to comment