Printing Avery 5160 Labels Using a Form Superbase provides the ability to print mailing labels through the Data|Labels menu selection. This tool does not; however, allow you to link multiple files together, use variables and images, or to change the attributes of individual fields or variables. To do any of the above, you must design a form with a detail block. In order to print a form with a detail block that has more detail records than the number of detail rows, a little bit of programming is required. This technote explains how to design the layout of a mailing label form and print the form. Mailing label form Open the Forms Designer. Page Setup should be set to 8.5 x 11 for the form. Place fields in a 1 x 2 5/8 region in the upper left corner of the forms designer. Make a modification to the field properties. Select all objects and move so that there is a 1/4 inch left margin and 1/2 inch top margin. Define selected fields as a detail block Detail block setting should be as follows: Rows: 10; Columns: 3; Row offset: 1.00; Column offset: 2.63; Across. You may also add a filter if desired. In Superbase, run the Label program as outlined below. If you include graphic objects, such as a border, in the first unit of the detail block, the Form Designer doesn't include them when it creates the other units in the detail block. You must add the graphic objects to the other units. If the graphic is an external image, you can create an external field and use the FORM SHOW command to display the image. To learn more about creating detail blocks, refer to the Designing Forms and Custom Reports manual. The following code uses the Customer example file from the SAMPLES\STOCKS directory. SUB main() CALL Label() END SUB SUB Label() OPEN FORM "label" REM If you are using a filter place it here. REM SELECT WHERE.... REM Select the first record in the file and display it SELECT FIRST FORM WHILE NOT EOF ("Customer") REM Update all units in the detail block. Since we have 3 columns of 10 rows there are REM 30 units. FOR i%% = 1 TO 30 IF NOT EOF ("customer") THEN UPDATE FORM ROW i%% SELECT NEXT ELSE REM If there are no more records in the database then pad the rest with blank REM records. BLANK FILE "Customer" UPDATE FORM ROW i%% END IF NEXT i%% REM Updates screen FORM PRINT CURRENT PAGE WEND REM Remove blank record from memory SELECT FORM CURRENT END SUB *Note: If you have calculated fields such as SER(), these values printout on the BLANK records. Since BLANK FILE creates a blank record in memory these values appear. Program: Superbase Versions: 2.0 Date: August 16, 1993 D Date: