Back to General Enhancements

Group Border, Pagination/Repagination and Minimum Detail

There are a set of legacy rules supported generally referred to as the “Group Pagination Rules” or simply as the “Group Rules”. These rules have a long history and there is no intention to change the behavior or support of those rules. However, it has long been desirable to have equivalent “group” functionality that is recognized in the core (aka base) pagination without having to rely upon the old group rules.

Having base support for certain functionality allows the form designer to maintain the documents more easily and also allows for modification of the transaction document via WIP editing - where rules are no longer running.

The process to have base pagination support had already started with the addition of Stay Together as a property that can be defined on groups and subforms.

As mentioned, Stay Together is an attribute added in a prior version that can be defined on groups and subforms. The old rule definition looked like this:/p>

  • ;GroupBegin;StayTogether;;

This group parameter establishes that the content of the group should stay together. The group pagination rule accomplished this by changing the size of the “Group Begin” section to encompass the boundary of the entire group. The base pagination however, recognizes the inclusion on the group/subform and will locate the group end without the need to change the size of the beginning section.

Setting Stay Together property in Studio

Remember repagination can occurs at any point where the size of any section within the group has data mapped into multiline text fields. This mapping includes rules, DAL scripting or even manual data entry. Not changing the size of the group begin section makes it easier for the form designer to manage the positions of the sections within the group and is something not easily done using the legacy group rule behavior.

New in version 12.7.1 Group Border

Keep in mind, the old group pagination rules are not being changed and may not mix with the base pagination functionality being added by these features.

The legacy group rule definition of a group box required that the user define a library resource section containing a single box object and the application of the following rule.

  • ;GroupBegin; Box(Margin(20,20,20,20));;

During the group rule pagination, the box object would be located and then adjusted to size around the group. The Margin parameter lets you define the distance (in FAP units) between the edges of the union rectangle of the sections within the group (left, top, right, bottom). Once the group pagination rule completed, the size of this box/border would no longer be adjusted - even if some operation later followed to change the size of the grouping.

The new feature does not require the user to create a library resource. Rather, by activating the property on the group/subform begin, the box properties can be accessed by the associated button and stored with the placeholder section within the form.

Groups and Subforms now allow the definition of a “Group Border”.

Setting the Group Begin Border in Studio

Checking the Group border activates the Box Options button and the user can bring up a property dialog.

Setting the Box Options in Studio

Since the position of the group border/box is determined by the size of the entire group, this is not something the user needs to set. Instead of seeing the typical coordinate properties, the user will see Margins properties that allow the user to adjust the box. Adjustments can be made to any border side and do not have to be the same.

When no margin is specified (all values equal 0) the border will be sized precisely around the full height and width of the sections within the group. The margin properties can be positive or negative depending upon whether you are trying to grow or shrink the border from the calculated positioning.

Any change in a section size within the group will cause pagination to occur and the border box will be adjusted.

If the group/subform splits across pages, a border will appear around the group sections that occur on each page.

New in 12.7.1 Subform Headers/Footers

Keep in mind, the old group pagination rules are not being changed and may not mix with the base pagination functionality being added by these features.

The legacy group rule definition of a subform header sand foodters required this rule specified on sections within the subform.

  • SetGroupOptions; (Header or Footer), CopyOnOverFlow;;

The rule specified whether the given section was to be a header or footer and/or whether the section would copy on overflow - meaning that the same section should appear on any new pages created by splitting the subform.

As with other legacy group rule behaviors, the knowledge of the purpose of the section was only know to the group rule pagination.

Starting in 12.7.1, the designation of whether a section is a header or footer within the subform is simply accomplished by including the section in the proper location of the form tree. Remember, subforms are essentially forms (FOR) from the library and only become associated with a subform within another form.

Likewise, the designation of whether a section within the subform should copy on overflow uses the standard section option.

Setting copy on overflow in Studio

Since a subform starts life as a “normal” form from the library, there are no special attributes necessary to begin this support. Simply define your subform using the regular header/footer designations and the base pagination will take care of the behavior.

New in 12.7.1 Minimum Section Count

Keep in mind, the old group pagination rules are not being changed and may not mix with the base pagination functionality being added by these features.

The legacy group rule definition to specify the minimum number of sections that should stay together on a page before breaking was accomplied by the following rule.

  • ;GroupBegin;GroupPagination(MinImagesOnCurrent(5));

The number included by the MinImagesOnCurrent had to include not only what you might consider the “detail” sections repeating within the group, but also had to account for any subform headers or footers that might apply. For this reason, determining the number to specify as the parameter sometimes required multiple run attempts to get settled.

This new feature allows the form designer to specify the minimum number of (detail) sections to stay together before breaking across pages. Unlike the legacy rule method, you do not have to include the count of headers or footers in this value. So if the subform has a header and footer and you expect at least three detail items to remain together before the subform should break, you would use a definition like this:

Setting the minimum sections count in Studio

In this implementation, the user need only specify the minimum number of non-header/footer sections they want to stay together.

Keep in mind that defining subforms within other subforms where each has a minimum can be problematic as the interior group will not know the requirements of the parent group. This means the interior group can determine to split across pages as long as its own minimum requirement is met.

The following is an example of subforms nested 4 levels deep where each subform has a header and footer. Notice that the necessary cumulative size of the footers has to be determined to leave room on the each page to close the groups before splitting to a new page.

In this example, there is also a page header and footer defined by the controlling form and the first subform defines a two headers and two footers, where only one of each is flagged for copy on overflow.

Example output