When in the Form Layout Designer for an order form layout, usually the best way to get to the Region Properties screen is by clicking on a field on the form, and then pressing the [Esc] key on your keyboard, and then from the Region pull-down menu option at the top, choose the Properties option.
Very often the only region properties that you will ever want to change are on the Behavior tab where you can tell it to print or not (Print this Region?).
Position and Name
Usually the Left, Width, Height, and Top are set by clicking and dragging a region, but if you need to set them to a precise position you can enter those values here (in inches). Also, each region must have a unique region Name, so that will be set here. When a new region is added, it will usually come up with a region name on its own, but you may want to give it a more descriptive name here. Each region must also be of a certain type.
The possible region types and what they mean are as follows:
General - This is the most common region type and just means that any field from the Orders table can be displayed in this region. Most of the regions on a form will be this type of region, and usually if you have the need to add a new region, it will be this type of region.
Area - This is the region type that must be used when you want to put in Area information, and is always inside of another General region that controls how the area information gets repeated. Any of the form layouts that show a place for listing areas will have this type of region that gets repeated based on the Script in its master region. See below for more information on the Script for a region.
Area Category Summary - Like the Area region type, this is a region that will always be inside of another General region. It must be used to show the fields that summarize areas entered onto an order. Any of the form layouts that show the place to list areas also have this type of region that is also controlled by the Script in its master region. See below for more information on the Script for a region.
Package - This region type must be used to be able to choose a Package to be used on an order form. It is used in the Packages form layout that comes with the program. It is also controlled by the Script in its Master region. See below for more information on the Script for a region.
Service - This region type must be used to show the fields for a service/product line item on the order. Like the Area region type, it will always be inside of another General region with a Script that controls how it gets repeated. Every order form has one region that is a Service type of region for listing the line items on an order.
Transaction - This is the region type that must be used to show payment or bill information on the order. It also will always be inside of another General region with a Script that controls how it gets repeated.
Behavior
On this tab you can check the Print this Region? box to indicate that a region is to be printed, or leave it unchecked if a region is to only be displayed on screen. The Allow Page Break? option when checked means that if during the displaying or printing of the region, if it runs out of space on the page, it will continue the region on the next page. When unchecked, it means that the entire region will be moved to the next page. Usually this box is only checked on the sub-type regions Area, Area Category, Service, Package, or Transaction and not on a General region. Also, refer to the Form Properties to see how to adjust the Top and Bottom for expanding regions, which will define when it will go to another page.
The Expanding? option when checked means that the region can expand to be larger than its set size on the form layout page. This is usually only checked for the one General region in the middle of a form that holds the service/product line item regions, since there could be more than 1 page's worth of those.
The Show on Pages options means that you want to show the region on either the first page, the last page, or always on both. Typically, any regions above the General region in the middle that holds the service/product line items will have only the First box checked, and any regions below that General expanding region will have only the Last box checked, while that General expanding region will have both boxes checked since it will start displaying on the First page and finish displaying on the Last page.
The SQL Information box allows you to limit the records shown in the region based on some SQL text. The only time it is used in any of the form layouts that come with the program is in the Payments region. There is never any other reason for you to use this box, so you can ignore it. The Region Type box on this tab is for the SQL Information and will always be General except for the payments General region, so it also can be ignored.
Border and Background
Just like the Field Properties, each Region can also have its own border and background. When the Show box is checked under Border, the border of the specified Color and thickness (Width) will be shown around the region. When the Print box is checked, that same border will also be printed out.
When the Transparent box is checked, it won't matter what color you have set for the Background or if it is set to print or not because it will be transparent. If the Transparent box is unchecked, then usually you will want the Print box to also be checked, and you will also want to confirm that the background color is not the same as the color for the Font used in any of the Fields within this region. Usually you will just leave the Transparent box checked.
Script
The Script for a region allows you to control how Regions that are inside of it get repeated. If you go to the Script tab for a region, and there are no region names listed under Regions on the bottom left there, then you will not need or even be able to have a script for the region. Usually the main region that uses a Script is the General region that is in the center of most form layouts. It has a script that controls how the Area, Area Category Summary, and Service regions get repeated within the region on the form.
Probably the best way to understand how a script works is to look at the Script for the region in the middle of the page for any of the form layouts that come with the software (e.g. "Style1-WorkOrder"). To get to this region, simply open the form layout in the form layout designer and then click on the Service Description box near the center of the page so that it is selected. Then hit [Esc] on your keyboard twice and it should now have selected the region that you want to look at the properties for. So to get to the properties screen for this region, select Properties from the Region pull-down menu at the top. Now go to the Script tab. In the Script shown on the right you will see the code that tells how the regions are supposed to be repeated inside of the general region.
Suffice it to say that there are many options here, but if you are needing to, for instance, not show the Area regions on the form at all, but just show service regions, you can delete the script lines here on the right that reference the areas (which in this example would be the "with caption Area Caption end;" segment, the "for each order.area do Area Detail end blank;" segment, the "with caption AreaCat Line Break end;" segment, and the "for each order.areacategorysummary do Area Category Summary Detail end;" segment. Then you would be left with only the lines that deal with the service captions and the service records.
Again, mostly you should refer to the forms that we have included for examples of how scripts are used. IMPORTANT: Be aware that if you delete a region from a form that is used in a script, you will get an error when you try to use that form; so be very careful to not delete regions that may be used in a script.
