The Case of the Disappearing Sub-Summary

By Daniel Wood, 15 January 2011

Recently I was working on building a large layout which is used for both printing and data-entry. One of the requirements was I needed to show a lot of "private" information that the data-entry person needed to see, but was not to be printed. The issue was solved using a very cool property of sub-summary parts.

First, the alternative possibilities:

Before I show the actual solution used, it pays to mention a couple of other possible solutions to the problem just to outline why they were not suitable.

Putting the information off to the side:

The first one would have been to just put all the private information off the right-hand side of the layout, beyond the edge of the page break.

hiddensubsummary 1

This method would work, and would be fine depending on the situation. However it was not ideal for this example:

  • Small monitors would need to resize window and/or scroll to see it
  • Breaks the flow of the layout, vision is not drawn to a section off to the side

The main issue was that I wanted to keep the dimension of the layout the same as the printable space, to prevent the layout having to be widened during data entry.

The "Sliding and Hiding" method:

Another option would have been to put the information on the layout in a particular section, and then mark everything in it as "Hide When Printing" this would solve the issue of not printing the information. However, now I end up with a gap in the layout when printing.

So, can everything be made to slide up and fill the gap left by the now hidden information? The answer is yes, kind of...

hiddensubsummary 2

Here is an example of some private contents in-line with the layout contents. Everything has been set to slide up & reduce size of enclosing part. The private contents have been set to do not print.

You can see green boxes in between the contents of the private section to indicate the white-space. The key point here is that this white space does not slide or disappear, it remains, leaving a gap.

hiddensubsummary 3

The solution to this particular problem is to group the entire contents of the private section into a single object, and set that object to do not print, and slide:

hiddensubsummary 4

The result is that the entire grouped object is treated as one object, so when it disappears, the only white space remaining will be the gap between the sections above and below the private section:

hiddensubsummary 5

The problem I have with this however:

The sliding & hiding method would actually work quite well, and in some situations it would be perfect, such as if the private data section is located at the bottom of the layout.

However, my biggest problem with this was the affect it has on page-breaks, or more specifically, trying to construct the layout to fit properly on the pages.

hiddensubsummary 6

As you can see in the picture above, because I have now added this section in-line, everything has been moved down, and the layout I worked so hard to build to fit on my pages, is now all out of alignment. Now it's all a case of trial & error when building the layout to ensure that the page breaks in the correct locations, I have to constantly accommodate the sliding and hiding of the private information section!

What I really want is a combination of the following:

  • The off-to-the-side method which does not affect page boundaries, AND
  • The in-line method which lets me see it, and let the layout flow.

Using a Sub-Summary part to show & hide the information

Finally, the solution was to use a sub-summary part!

I created a sub-summary part, and chose my tables primary key field as the break field. In fact, it doesn't matter what break-field you choose, so primary key is as good as any.

The key to this technique is as follows:

While in browse mode and form view, sub-summary part(s) will remain visible even if the records are not sorted

In order for a sub-summary part to actually print, the records have to be sorted, so lets just not sort the records! Amazingly, the sub-summary remains visible in browse mode, which is perfect as a means to let use it for data entry, putting in links, showing important information etc.

hiddensubsummary 7

hiddensubsummary 8

You can see in the image above, the sub-summary is placed at the top of the layout.

Best of all, the sub-summary part has no adverse effect on existing page-break boundaries, so I can still construct the layout using the page boundaries, making building the layout so much easier for printing purposes.

hiddensubsummary 9

A note for FileMaker 9 users

Please note that because this technique makes use of sub-summaries in browse mode, this technique will not work for users of FileMaker 9 or sooner. Browse-mode sub-summary viewing was introduced in FileMaker 10. In this situation, the sliding & hiding method would be more appropriate.

Final thoughts:

To be honest I was completely surprised when I jumped into browse mode and saw the sub-summary part staring me in the face with the records unsorted. My original intention was to ensure the records were sorted by the break-field so that the sub-summary would appear in browse mode, and then use script triggers and custom-menu overrides for printing to ensure the records were then unsorted prior to printing.

However as things happened I was spared all of that work by an unusual quirk of FileMaker, I love it when that happens!

Example File:

Please find attached an example file. This file was used for all the screenshots in this article, and is provided to help you fully understand what is going on in this article, and to let you experiment in FileMaker with this solution.

Download Example File

Something to say? Post a comment...

Comments

  • Michael Gilman 19/01/2011 7:00am (14 years ago)

    This was a tough lesson for me to learn a while back, but now I am a pro at utilizing this type of function. Well written tip.

  • Peter Newland 18/01/2011 10:47pm (14 years ago)

    We use a similar technique in all our solutions. The body part is a list and has a 'toggle' script to switch between show as form/list. When show as form is toggled the sub summary part 'magically' opens to display the full record. Saves having separate list and form layouts!

RSS feed for comments on this page | RSS feed for all comments

Categories(show all)

Subscribe

Tags