4D v16.3Using output control lines |
||||||||||||||||||||||||||
|
4D v16.3
Using output control lines
Using output control lines
You control the Header, Detail, Break, and Footer areas with the output control lines in the Form editor. You move the control lines vertically to allow more or less space for each area. Any object that you place in these areas is displayed or printed at the appropriate location. Here is how these areas work when the form is displayed or printed in Application mode, or using the integrated functions of the Design mode.
Whenever any form is used for output, either for screen display or printing, the output control lines take effect and the areas display or print at designated locations. The output control lines also take effect when a form is used as the List form in a subform area. The output control lines have no effect when a form is used for input. Methods that are associated with objects in these areas are executed when the areas are printed or displayed as long as the appropriate events have been activated. For example, a object method placed in the Header area is executed when the On Header event takes place. You can create additional control lines to set additional Break areas and Header areas for a report. These additional areas allow you to print subtotals and other calculations in a report and to display other information effectively. Additional control lines are discussed below in Creating additional control lines. You adjust the size of the Header, Detail, Break, and Footer areas by moving the output control markers. Output control lines are displayed as lines across the form. Each control line has an identifying marker and label that is displayed in the ruler. The control marker is the triangle in the ruler and the label is the letter or letters next to the marker. You can move a control line by dragging its marker or label. By default, the labels of the control lines are always displayed; however, you can hide them if desired (refer to the “Showing/hiding elements in the Form editor” section in Form editor). When they are hidden, you can display the labels temporarily by clicking on the control markers. Labels indicate the name and location of each marker with respect to the form origin. When you move a marker, the label indicates the new location of the marker in real time. Labels allow you to move control lines even when the rulers are not displayed. The figure below identifies control markers and labels: To move a control line, drag the control marker or the marker label vertically.
The control lines cannot be dragged out of order. For example, if you attempt to drag a Footer control line higher than a Break control line, the drag operation automatically stops when the Footer marker reaches the Break marker. You can place markers and control lines on top of one another. Placing one marker on top of another reduces its area to nothing, removing it from the report. For example, if you have nothing to print in a Break area, you can drag the Break marker on top of the Detail marker. Doing so prevents 4D from creating space for a Break area. The report can thus utilize all the space available on the page. If you don’t want to print any details, drag the Detail marker on top of the Header marker. If you don’t need a Header, drag the Header marker to the very top of the form (at point 0). Warning: Active objects (fields or variables) located in the details of forms must not overlap the header or footer area, otherwise they will not be displayed when the form is executed. The report examples shown in this section use Break levels and Break Headers. To create areas for these features, you create additional control lines. The Form editor always starts with the original control lines, labeled H, D, B0, and F. B0 stands for “Break at level 0.” Level zero takes in all the records; it occurs after all the records are printed. Additional Break control lines are designated with numbers. A control line labeled B1 stands for “Break at level 1.” A level one Break occurs after the records grouped by the first sorted field are printed.
H stands for “Header,” which is printed at the top of each page. Additional Header control lines are associated with Breaks. H1 stands for “Header at level 1.” A level 1 Header is printed just before the records grouped by the first sorted field are printed.
You create additional control lines by holding down the Alt key (Windows) or Option key (Mac OS) while clicking the appropriate control marker. You use a Break control line to create a Break area for the designated level. You use a Break Header control line to create a Break Header area at the designated level. The new line is positioned behind the existing control line; to see the new control line, you need to drag the existing line off of it. If you use the Subtotal function to initiate Break processing, you should create a Break area for every level of Break that will be generated by the sort order, minus one. If you do not need anything printed in one of the Break areas, you can reduce its size to nothing by placing its marker on top of another control line. If you have more sort levels than Break areas, the last Break area will be repeated during printing. The figure below shows additional control lines: To delete Break or Break Header control lines that you have created, hold down the Ctrl key (Windows) or Command key (Mac OS) then click on the Break, Break Header, or label of the control line that you want to delete. 4D deletes the control line and, if necessary, renumbers the remaining lines.You cannot delete the original control lines H, D, B0, and F .
See also
|
PROPERTIES
Product: 4D
HISTORY
ARTICLE USAGE
4D Design Reference ( 4D v16) |
||||||||||||||||||||||||