Another special type of page area is the non-flow page area. Unlike regular page areas, non-flow page areas do not participate in the normal flow of the element. The elements in the main flow are never placed in a non-flow page area. The simplest usage for a non-flow area is to create a rectangular box on a page. If no element is attached to the non-flow area, the area appears as a rectangle with the selected border.
A non-flow area can be created in the Layout View like a regular page area. Use the ‘Draw Area’ button to create the area and after the area is created, rightclick on it to open the ‘Area Properties’ dialog box where it can be marked as a non-flow area by deselecting the ‘Flow Area’ attribute.
|#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index
Fixed Position Elements in a Report Template
A more interesting application of the non-flow page area is the ability to place elements in these areas. Elements added to a non-flow page area do not belong to the main document flow. They are only printed in the non-flow area to which they belong. Another important difference is that all elements in a non-flow area have fixed positions and sizes.
Elements in non-flow areas do not flow like regular elements. Instead, the position and size of the elements are fixed at the time they are created. The position and size of the elements do not change regardless of the size of other elements. If the contents of an element are larger than the size assigned to it, the element is only partially printed.
Adding elements to a non-flow area is similar to adding elements to the main document. The same element buttons are used. To add elements to a nonflow area, first select the area on the page design view. When a non-flow area is selected, a thick border is placed around the area.
Elements can be added to the non-flow area by clicking on one of the element buttons. When an element button is clicked, the Report Designer enters element insertion mode, where an element can be positioned in the area by clicking the mouse at the starting position and dragging the mouse to set the size.
This procedure is the same for all elements. If an element does not take up the entire space assigned to it, it is formatted using the same algorithm as when it is the only element on a report with the specified printable area. For example, a text element is wrapped inside the area and flows down until it reaches the end of the area assigned to it.
Advantages and Disadvantages of Fixed Position Elements in a Report Template
Fixed position elements are useful in form design and in other situations where the positions of the elements are fixed, such as mailing labels, preprinted forms, etc. While the ability to easily position an element at any location on a page seems very attractive, there are some disadvantages of using fixed elements. First, if an element outgrows the space assigned to it, its size will not change dynamically, and this could cause truncation. Second, since the positions of the elements are fixed at design time, they cannot be adjusted if the size of the elements expands. If care is not taken, fixed position elements could potentially overlap other elements that flow on the same area.