PDF version of this page

Form Building Tutorial

FTForm has two operating sections, the first builds an XML file from existing input. You should complete the prior "Quick Hands-On Example - Data Extract" before doing this tutorial. Please load that file, if you have not it, please load this file QAD PO XML File and immediately rename it to QAD PO Example. Also please open the file "QAD PO Example.pdf" and print to see what the final document should look like.

Quick Review of XML Tutorial

In the XML tutorial, when we named the new Document, we made decisions that impact the form design, particularly Layout.

The choices are (from most to least complex):

Full different documents (example, Fax Header, PO, Terms and Conditions)
Standard multi-page, single document (PO for example) with different page layouts for the first, intermediate and final pages
Simple one page (common layout for all pages) for documents that rarely exceed one page
Base page only fixed layouts (documents from master only) or details only (such as label pages)

This selection builds document templates for form design, with Standard equating to most forms from Version 6 onward, and Full offering additional facilities.

Select the right-hand (form) block over the top of the XML layout to go to the form definition screen, and you'll see the content change from the input file to a blank screen with outline ruler spacing changed to your preference (1/300 inch in this example, to change spacing use Preferences via the pull-down menu).

About to select:

Selected:

Go to Toolbox and select Layout order to see the Layout Placement list at screen left.

Layout placement shows components for a "Standard" form layout (Background through Page footer) with the XML-defined detail record types last in the list.

Top

Selecting Form Layout Components

Right now the main screen is blank.

The gray area is printer margin. Margins are normally enforced top and left (you cannot print within the gray area) but NOT enforced bottom or right. A few lasers are "edge to edge" and you may then print within the top/left margins.

The bulk of business forms show line items within a framework of information that applies to the whole document. This information occurs once only and comprises "header" and "trailer" information such as totals. FormTrap allows producing the full header information once only, with less on subsequent pages (typically you will not require full billing and delivery information on pages after the first). Similarly, the trailer information need only be shown once, normally last, with "carried forward" information on one line sufficient for preceding pages. These both apply where the majority of documents are more than one page.

These are the "layout components" for a Standard document as described above:

You are on Background as shown in Layout placement via the current layout  symbol.

Top

Remove Redundant Records

Formatting assumes all records defined in the XML extract will be required and shows all records at initiation in the Layout placement list. This includes redundant records, so delete the entries for Unw Page Header and Unw Detail Header as shown (example is for the Unw Page Hdr).

Note that the record to delete must be activated, double click on that record to activate. If you accidentally delete a record, you can undo by pressing the Undo button, or by pressing Ctrl + Z.

This symbol: shows. After deletion, returns to the top (Background) layout component.

Top

Background Fields - Name and Address of our Company

Start by adding your company name and address to the Background of the document. Background is printed on all pages. To add Text, select and place the Short text snippet from the Toolbox onto the form (if Toolbox is not available, open it via Toolbars top menu item). Text has two appearances:

Whole Block Editable Content

Whole Block has a light red frame and can be manipulated as a graphic entity.

To change content, double-click and highlight (in this case to change the company type from , Inc.).

Select all text within the block, then change the text to your company's Name and Address and press Mouse Right to see a brief display of text change tools (at the position of the mouse). These tools apply to the whole block when that is selected or just the highlighted text. Select whole block and set Arial (font type), Bold (style), 12 (size) and color.

Press (center align icon).

Now select inside the block and add lines for your phone number, fax number and email address. Finally make these last two lines smaller than the other text and unbold the literals within this additional text.

Drag and drop Colon-aligned text block to the form, and edit to give the "P.O. No.: 1234567", then select the entire text block.

Select Align at Decimal , pull down the options and select Colon.

Press Mouse Right to open an on-screen set of tools. Select size as 14.

Select 1234567, Mouse Right, Bold .

Select the Link tool, and pull-down Master, then PO No as the source field.

1234567 is now indicated as a source field by the light yellow background, and these new tools apply, available both on the top and on the "Right Mouse" menus:

  • Link
  • Unlink
  • Show data source (which toggles data source name on and off, try it now).

Add the remaining items:

  • text starting Revision: is one block of text, aligned and (pull down) to the Colon.

  • values are Document values doc page current and doc page last, make this object right aligned.

Use F1 to look at the manual if you have questions.

Use the tool Align at Character , from the Tools menu.

formtut_align_colon formtut_align_colon
About to align after alignment

This and the other alignment tools show cross-hairs at possible alignment points, the standard 9 are corners and horizontal and vertical centers. For the P.O. No. object which is aligned at the colon, additional alignment crosses are shown. You may need to change scale (slider at the foot of the form layout) to select crosses that are close.

Top

Add the Report Header to Form

Let's recap, a Report header is the header for the first page only and is replaced by a Page header on subsequent pages. If you want the same heading on all pages, delete the repost header, define a Page header and remove the rule (to then print on all pages).

Select Report header from the left menu, the activated icon shows, this shows on screen as a red bordered area, pull the bottom of the area to size it. Existing objects on the base page are grayed.

Add the objects for Supplier. Address lines are often missing and we want to remove embedded empty lines via the Delete empty lines button .

Positioning of the resulting text is controlled by the Vertical alignment tool .

Top

Draw a Rectangle around the Supplier Address

Drag and drop the rectangle from Toolbox, then adjust it as required. These tools apply, shown at the current Mouse Position via Mouse right:

  • Change line color, width and fill color via the icons.
  • This block within Select controls which handles are shown.
  • Change size by pulling the white handles (show via the Show Size Handles icon).
  • Change location by pulling the square box associated with the Rotation icon (show via ).
  • Change Corner shape via these icons, and roundness by pulling the yellow diamond (show via ).

When you have the rectangle as you require it, copy and paste it. From Tools, set Horizontal Step to 30/300th (1/10") and press keyboard right arrow until it's positioned where you'd like Ship To.

From Tools, Horizontal Step, select Record from the pull-down list. Now click the left sides of both rectangles, you'll see the new value in Horizontal Step which is the distance between the two rectangles. Now cut and paste the Supplier texts, and press keyboard right arrow to move them the horizontal step. Change the texts to Ship To and use the link tool to link to equivalent Ship To fields.

Click Tools and see Nudge to view the new value in Horizontal.

Top

Add the Page Header to Form

Select Page header, the activated icon shows, and the new area appears on the main screen.

Use the draw earlier icon to place it second and apply to redraw the screen. This places the Page header where the Report header was, and moves the Report header down.

Marquee all of the fields in the Report header, copy them, place focus on the Page header (via Layout placement) and paste. This places the Report header fields at the same position on the Page header. Vary by removing rectangles and reducing the texts. Reduce the size of the Page header to leave the same space after it, as for the Report header.

Top

Set up Report Header Comment

This field may or may not be there and is of indeterminate size. We'll amend the Report header to carry this field, and set the Report header to adjust its size, depending on the number of lines in this field (including the absence of the field).

Drag and Drop Long Text from Toolbox, then change size and other details until you have a text block of around 2/3rd of a page wide. Long Text has these icons set, check them.

Word-wrapped

Delete empty lines

Select Properties and see these prompts:

  • Tick Floating height, this moves the bottom of this layout up where data is missing or lines are removed.
  • Gap is the distance from the bottom of the last field to the bottom of this layout and is adjusted to match the data actually printed.

Top

Set up Detail Line

Set up a detail line and add the text items as below. Temporarily, this excludes the Revision, Site, Supplier and Manufacturer lines as well as the Product Comment. We'll add these later.

Top

Group Record Header

Groups head a section of detail lines and/or trail a section of detail lines. Most Groups hold a table frame and titles for detail lines which follow. The Trailer closes the table. Frame and Column lines draw down the page to encompass all of that group's detail lines and head any additional pages required. To add a Group header:

Select Layout, Add, select Group, then Group from the pull-down as shown.

Enter detail in the resulting Group window as shown. Tick Header (Product Header) and Footer (Product Footer), this defines them and places them in this group. You can see them in the Layout placement windows.

In Layout placement you'll see Product Header below Product, move it up prior to Product with and apply to the screen using .

You need to associate the Product with its group header. Select Product, then Properties and change Group to select Product Group. This is essential. Formatting automatically generates teh Product Header when it sees the first Product record, and closes the group when either the data file ends or a detail for a new group is recognised.

The drawn outer frame is treated as a rectangle for attributes, alignment and corner manipulation. Column lines have the attributes of lines. Manipulate the Product Header and the associated Product fields until you have something like that shown below, allowing space for header title lines. Define this by copy and paste Short Text from the Toolbox, then over-key column titles with a tab between.

Move the tabs to fit the text where it belongs from left to right.

The table object frame and column lines also show on the Product record. Their horizontal position can be modified using the normal tools on this record too.

We need to change the Product Trailer, so activate it in Layout placement and select Properties.

There is no text required, so make size small (1/20th of an inch in this picture).

Note the Expand to bottom tick box. This extends the frame down until it meets the end of page record (either the Page Footer or Report Footer). Unticked means the frame finishes after the last detail.

Top

Sometimes present, sometimes absent fields in the Product record.

The product record contains five fields that may be absent; Site, Revision, Supplier Code, Manufacturer and Comment. Comment is word-wrapped and may extend over a number of lines on output. We'd like vertical space for missing items to be recovered (not print).

Make Site, Manufacturer and Comment lines one object:

"Delete undefined lines" ,
Tab to position for the alignment of Rev'n, SuppCode and ManufItem.
Smaller font size for Comments.

The text object will shrink (down to nothing) if there are no optional items, but requires additional work in defining the tab layout. Note that you must start the Site line with an initial tab, this required if there is a possibility of no first item in the second line (not the case here). This is the layout:

Finally, select Layout Properties and tick Floating height with a small Gap of around .1 inches (30/300th or 2.5mm).

Top

The bottom and right sides show the grey 1/4" that some laser printer leave as the margin. Right and bottom margins are generally ignored and can be written in. Footers draw bottom-up, so while it sounds counter-intuitive, dragging the bottom down lifts objects up the page.

This prints only on the last page of a PO and contains footer (total) information.

Define it as shown, data is from the Header record, and you'll need to read this to work out how to "corner" the rectangle only at the bottom. You'll need to do the same with the frame in Group as well.

Corners on Rectangles, see here

Top

The Page Footer shows running totals and points to the next page. We'll begin by creating the Variable and Formula for running total.

Set the screen back to Data Mode, by selecting the left top (data) block and Document (from bottom of left list).

        

Expand the left tree until you can see Variable under Master, select and press Mouse Right and select Properties. Open the Variables tab, and enter a new variable as shown.

        

Now go to Product in the tree, select Formulas, (Mouse right) Properties, Formulas tab and Add a new formula. Make Formula as below. Value is recalculated as part of printing each product record:

[master/RunningTot] = [master/RunningTot] + [product/Extended cost]

This is a math formula, data fields are included using Insert and the list shows numeric fields only, in this order:

current record fields
Master record fields
Master record variables
System field values

This is the finished Page Footer showing the Data sources for the fields:

Top

Brought Forward

This is the equivalent of the Page Footer - in fact we'll copy and modify those details.

To set up, select Add (from Layout) and Brought Forward from the drop down.

On the Brought Forward screen, set Name, Height and tick Place inside the group (unticked, prints prior to the Group Header).

Now Cut the Page Footer text line and Paste into the Brought Forward.

Change to "Brought forward from Page" and link number to doc page prior.

We're done, this is the complete report, now for testing.

Top

Testing in FTForm8

The testing procedure in FTDesign duplicates the Production system. The program builds, then installs the file ex Build, then runs an exact copy of the Print Logic to produce PCLXL or PostScript (shown converted to PDF) or a direct PDF output file. The process can take up to a minute with very large Asian fonts, and is typically 20 seconds using Western fonts.

The above shows the selection of color , fast image and direct PDF as output .

There is a longer file that shows B/Fwd and Page Footers - something the original file does not show.

To load the longer file select the Data portion of the main screen, this opens the top left menu where you'll see Load data files, select that and load "PO Long.txt" file.

This completes the tutorial.

Top