Adding an include file element

Use the include file template element to attach or link to external files from your report.

About this task

You can choose to link the file or physically embed the file into your output document. However, the way that include file elements are handled depends on the output format and the location from which you are retrieving the file.

Physically embedding files

About this task

When you are selecting files from a local or remote location:
  • For Legacy PDF, HTML, and XSL-FO outputs, the included file is always a hyperlink.
  • For PDF output, the included file is imported and the full contents of the document display.
  • For Microsoft Word output, Rational® Publishing Engine updates Microsoft Word fields automatically during document generation. If an INCLUDE TEXT field is generated, the macro did not run and the task of importing the file is delegated to Microsoft Word. An include file is not visible in the output document until all fields are updated. To update the fields, use the Update Fields feature in Microsoft Word or use the macros that are contained in the RPE_HOME\utils\word\rpe.dot style sheet.
    Tip: A Microsoft Word document that links to other files is not self-contained. Moving the document on other computers prevents you from visualizing the content of the linked documents. If visualization is needed, use the Break links feature in Microsoft Word to include the contents of a linked file.
When you are selecting files from the Central Management component and physically embedding them:
  • For HTML and XSL-FO outputs, the file is included in a ref folder and a link is created in the report to the file.
  • For Microsoft Word or PDF outputs, the file is imported into the report in its original file format.
  • For Legacy PDF output, the file cannot be physically embedded. Select a different output type or dynamically reference the file.

Procedure

  1. In the Palette view, select an Include file icon Include file element and drag it into the template content editor. The Select a file window opens.
  2. Select a .doc, .docx, .txt, or .rtf file to include:
    • From the Central Management component:
      1. Select the Load from library tab.
      2. Expand the library name.
      3. Select a file.
    • From a local or remote location:
      1. Select the Open local or remote tab.
      2. Click Browse.
      3. Select a file.
    Tip: If you find yourself always using the same tab to choose a file, select the Default to this view when working with files option. Then the Select a file window always opens to this tab.
  3. Click OK.
  4. Select the Include file element in the template content editor.
  5. In the Properties view, select the Specific tab.
  6. In the Including type field, select Physically embedding to import the document into the report during document generation.
  7. Optional: In the Command field, enter a command that is to be issued during document generation.
  8. Click the Save icon to save your changes.

Dynamically referencing files

Before you begin

Important: Use physically embedding instead of dynamically referencing when:
  • A template or snippet is designed to extract information from a data source.
  • A template or snippet contains a dynamic reference in it.

About this task

When you are selecting files and dynamically referencing them:
  • For HTML, XSL-FO, PDF, and Legacy PDF outputs, a link is created to the file in the Central Management component. When the link is clicked from the report, the user must authenticate with the Central Management component.
  • For Microsoft Word output, Rational Publishing Engine updates Microsoft Word fields automatically during document generation. If an INCLUDE TEXT field is generated, the macro did not run and the task of importing the file is delegated to Microsoft Word. An include file is not visible in the output document until all fields are updated. To update the fields, use the Update fields property in the document specification, Update Fields feature in Microsoft Word, or the macros that are contained in the RPE_HOME\utils\word\rpe.dot style sheet.
    Important:
    • Do not use the Update fields property when you are generating exceptionally large documents. Large documents might be unable to generate with the property set and could result in an out of memory error.
    • Do not run a macro to update the fields if you are referencing documents from a secured location. The authentication process cannot be completed and causes the macro to hang.

Procedure

  1. In the Palette view, select an Include file icon Include file element and drag it into the template content editor. The Select a file window opens.
  2. Select a .doc, .docx, .txt, or .rtf file to include:
    • From the Central Management component:
      1. Select the Load from library tab.
      2. Expand the library name.
      3. Select a file.
    • From a local or remote location:
      1. Select the Open local or remote tab.
      2. Click Browse.
      3. Select a file.
    Tip: If you find yourself always using the same tab to choose a file, select the Default to this view when working with files option. Then the Select a file window always opens to this tab.
  3. Click OK.
  4. Select the Include file element in the template content editor.
  5. In the Properties view, select the Specific tab.
  6. In the Including type field, select Dynamic link to creates a link to the document in its current location.
  7. Optional: In the Command field, enter a command that is to be issued during document generation.
  8. Click the Save icon to save your changes.

Feedback