Strategy ONE
Adding an attribute to the Customer Header section
The next section on the Layout area is the Document Header. You can use the Document Header as a cover page, since this section prints once at the beginning of the document. Since this document does not contain anything like a cover page, move to the next document section, which is the Group Header, in this case, the Customer Header.
If you do not need a section, it does not display in the PDF as empty space if controls have not been added to it, since by default the Can Shrink option is set to true. This setting automatically sets the height of an empty section to zero. If you have placed controls in the section, or the Can Shrink option has been changed, set the Visible option to false.
Recall that placing the Customer attribute in the Grouping panel created Customer Header and Customer Footer sections. We will add information specific to each customer to the Customer Header section. This data includes the customer name, address, and invoice information, and will print once for each customer.
First add the Customer attribute, to display the name of the customer being invoiced, and a text field to label and identify the attribute. An attribute on a document is referred to as a data field, which is another type of text field. For more details on using data fields in documents, see Adding dynamic data to a document.
To add an attribute and a corresponding label
-
Click Text Field on the toolbar. When you move the cursor to the Layout area, the pointer becomes crosshairs.
-
Click at the top of the Customer Header section. A box is placed in the section.
-
Type the following in the text field:
Bill To:
-
Set the following options in the Property List to position the text field as shown in the example invoices:
-
Left: .34
-
Top: .03
-
Format the text:
-
Bold
-
Font size: 10
-
Drag and drop Customer from the Datasets pane to the Customer Header. A text field containing the text {Customer} is placed on the Layout area. The text will be replaced with the customer name when the PDF is generated.
-
Set the following options in the Property List to position the data field as shown in the example invoices:
-
Width: 2.5
-
Left: .11
-
Top: .37
