Jump to content

Print order records


GertLievens

This topic is 6184 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

cat.jpg

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 6184 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.