In older versions we used to adjust the height of the field to extend at least one pixel across the body to sub summary border and then the field would display when the sub summary part displays and not in the subsequent records grouped beneath it. But this no longer works in newer versions of FileMaker.
What you can do is leave these fields out of the sub summary part (only the horizontal lines shown in your example would be inside a sub summary layout part) but use conditional formatting to hide the field when the preceding record is part of the same sub summary group.
The conditional format expression for your Unit field, as an example, might look like this:
Let ( R = Get ( RecordNumber ) ; If ( R > 1 ; YourTable::Unit = GetNthRecord ( YourTable::Unit ; R - 1 ) ) )
In Versions of FileMaker older than version 13, you can then specify a white text color or a very large font size to make the contents of the field not visible. In FileMaker 13, you can use this expression inside the new "Hide Object When" setting in the Inspector.
Phil...thanks for your reply. That "Hide Object When" setting in 13 sounds like it could be useful. Might have to look at upgrading.
I was able to get close with the conditional formatting getting the Unit and Shelf sections to appear as I wanted. So that worked.
However, I don't think I can do what is shown solely with Conditional Formatting. Where I'm running into issues is the one field calculating the total number of items per shelf (under "Total") and the separately calculated number of each item (under "Quan") starting on the same line, with a second (or more) lines below that for other items. For example, On Unit A, Shelf 1, there are 5 total items, 3 hearts and 2 moons. I haven't figured out how to get the 5 and the 3 on one line, as they need to be calculated as a part of another sub-summary.
Maybe I'm missing something simple?
Make Quan a calculation field that uses the GetSummary function to compute the same subtotal that you'd get by putting the summary field into the sub summary layout part. This function uses two fields as parameters. The first parameter is your summary field, the second field, the break field, is the same field you'd specify as the "sorted by" field for you sub summary layout part.
Hmmm...let me look into this GetSummary. Maybe that will do the trick!
Phil! You're the winner. I had never used GetSummary before, but I think it might be my new favorite calculation term, because that's a thing now.
Based on a quick and dirty test with some basic data, it seemed to do what I want. Now I need to scale it to the much larger database and see if everything works out for me.
Now the only trick is getting the dividing lines to work out.
Ironically the dividing lines are the only thing to put in your sub summary layout parts -- which can be sized to be nearly the same height as the width of the line.
Yep. I did that, but it still leads to a little bit of line messiness. I'm going to experiment today with the "hide object when" setting in FM 13. It can be applied to lines as well, with the same conditional calculations used on hiding fields. So I have a feeling some really clean layouts can be made this way.
Thanks for all your help!
Between that GetSummary Field, and my purchase of FM Pro 13 today to get me the "Hide Object When" option, I have made the layouts of my dreams today. This is what I've wanted for 10 years. Sweet!