Reusable Logic


1

2

3

4

5

6

7

 

Unit Objectives

In this unit we will create Active Content which is a segment of the document that acts as an independent file. The concept of capturing a part of a field via substring will be demonstrated. Pulling multiple values together using the concatenation function will be discussed. Finally we will create a barcode that will be placed below the address block.

In this exercise you will create a remittance slip.

2. Duplicating a Publication

In this section we will duplicate the Offer Letter and reuse it for the Summary Statement.

  1. 1. In the Work Center Manager click on Design tab, Publications bar.
  2. 2. Double-click the Company Letters project folder.
  3. 3. Select Offer Letter publication.
  4. 4. From the main menu select Edit/ Copy.
  5. 5. From the main menu select Edit/ Paste.
  6. 6. Right-click the Copy of Offer Letter.
  7. 7. Select Rename.
  8. 8. Type, Summary Statement.
  9. 9. Press Enter.
  10. 10. Double-click Summary Statement.
  11. 11. Delete the Section icon.

 

3. Concatenation

  1. 1. In your document mark your cursor at the top left of the page.
  2. 2. Type Dear:
  3. 3. From the main menu, select Insert / Field / Concatenation.
  4. 4. Label, type Customer’s Full Name.
  5. 5. Click the New button.
  1. 6. Click
  2. .
  1. 7. Select Data Field.
  2. 8. Use the drop down and select the Summary Dictionary.
  3. 9. Click the New Alias button.
  4. 10. Name, type, Title.
  5. 11. Type, select, String.
  6. 12. Example, type, Ms.
  7. 13. Click OK, OK.

Since we trimmed all extra spaces in the import phase, we need to add a space to separate the data fields.

  1. 14. Click the New button.
  2. 15. Click
  3. .
  1. 16. Select Constant, String.
  2. 17. Click the spacebar.
  3. 18. Repeat the same process for the following:
  4. Name

    Type

    Example

    First Name

    String

    Linda

    Insert Space

    Last name

    String

    Smith

  5. 19. Click Create.

 

  1. 1. From the main menu select Insert/ Presentation Object/ RTF.
  2. 2. Select Summary.rtf.
  3. 3. Click Open.
  4. 4. From the Standard toolbar click, the Save icon.

so far:

4. Active Content

Active Content is the term for a sub-routine containing a segment of document logic and or presentation objects.

In this section we will create an Active Content object that we are going to later place in the Summary Statement.

  1. 1. In the Work Center Manager click on Design tab, Active Content bar.
  2. 2. Double-click the Company Letters project folder.
  3. 3. From the main menu select File/ New Active Content.
  4. 4. Type, Remittance Slip.
  5. 5. Press Enter.
  6. 6. Label, ensure, Remittance Slip.
  7. 7. Click OK.

Now we are going to place an image.

  1. 1. In the logic map, mark your insertion point at Logic List () <Insert object here>.
  2. 2. From the main menu select Insert/ Presentation Object/ Image.
  3. 3. In the Company Letters project folder, double-click remitslip.bmp.
  4. 4. From the main menu select Format/ Shape.
  5. 5. Select the Layout tab.
  6. 6. Flow, select Anchored.
  7. 7. Click the Behind Text runaround icon.
  8. 8. Ensure the X and Y positions are both 0.
  9. 9. Click OK.

so far:

We will now create a text box for the account number.

  1. 1. From the main menu select Insert/ Presentation Objects/ Text Box.
  2. 2. Draw a text box over the Account Number on the remittance slip.
  1. 3. From the main menu select Format/Shape.
  1. 4. Select the Attributes tab.
  2. 5. Label, type, Account Number.
  3. 6. Line, Weight 0.
  4. 7. Click OK.

5. Substring

Substring extracts one or more consecutive characters from within a text string. In this section we are going to substring the Account Number so that we pull the fifth byte, starting from the second byte.

  1. 1. In your document mark your cursor in the Account Number text box.
  2. 2. Set the font to Arial, 12, Bold, Center Alignment.
  3. 3. From the main menu select Insert/ Field/ Substring.
  1. 4. Label, type, Substring Account Number.
  2. 5. Offset, 2.
  3. 6. Size, 5.

We will build a new alias for our data field Account Number.

  1. 1. Click
  2. .
  1. 2. Value, select Data Field.
  2. 3. Click the New Alias button.
  3. 4. In the Dictionary drop down, select Summary.
  4. 5. Name, type, Account Number.
  5. 6. Type, select, String.
  6. 7. Example, type, RTY345678.
  7. 8. Click OK.
  8. 9. Click Create.
  9. 10. From the Standard toolbar click, the Save icon.

6. Barcode

The barcode function converts characters and numbers to the appropriate sequence of lines that are required for the selected type of barcode. Series 5 supports a range of standard barcode types, as the barcode fonts are automatically installed in the Work Center and available for all drivers and variants.

Next we will add a Data Matrix barcode that consists of the system variable run date.

  1. 1. In the logic map, mark your insertion point at Editor Text Box (Account Number)
  1. 2. From the main menu select Insert/ Presentation Objects/ Barcode.
  2. 3. Label, type, Run Date Barcode.
  3. 4. Value, click
  4. .
  1. 5. Select System Variable.
  2. 6. Select Run date.
  3. 7. Click Create.

We are going to format the date so it reads ddmmyy.

  1. 1. Click the Format icon
  1. 2. Treat As Date, click, Date radio button.
  1. 3. Date Format:
    Order, select, Day, Month Year.
    Day, select 01.
    Month, select, 01.
    Year, select 00 (last 2 digits).
  2. 4. Click Update..
  1. 5. Mode select, Standard.
  2. 6. Barcode Group select, Data Matrix barcode types.
  3. 7. Select Data Matrix.
  4. 8. Click Create.
  5. 9. Position the Barcode under the text Customer’s Address.

so far:

  1. 10. From the Standard toolbar click, the Save icon.
  2. 11. From the main menu select Task/Issue.

Your logic map looks like this:

7. Insert Active Content into the Summary Statement

We will insert the active content into the Summary Statement.

  1. 1. In the Work Center Manager click on Design tab, Publications bar.
  2. 2. Double-click Summary Statement.
  3. 3. In the document, mark your cursor after 3.75%.
  4. 4. Press Shift + Enter 11 times.
  5. 5. From the main menu select Insert/ Control Objects/Active Content / Active Content.
  6. 6. Label, type, Remittance Slip.
  7. 7. Double click the Company Letters folder icon.
  8. 8. Select Remittance Slip business logic.
  9. 9. Click Open.
  1. 10. Click Create.
  2. 11. From the Standard toolbar click, the Save icon.

so far:

Your logic map should look like: