Adding/Editing Document Templates

The following section describes how to work with the editor of document templates when adding a new document template or editing an existing one. Document templates are described in the Document Generation section.

The editor of document templates can be started as described in the Working with Configuration Elements section. The following properties should be specified:

Specify the name of the document template uniquely identifying it within the business space version. The name of the document template must be unique among the names of other document templates defined in the business space version. Any identifier is acceptable as a name. Space symbols in the name are allowed.

Specify any text that describes what the document template is for, how it is used etc. Providing a description is not mandatory but is highly recommended. Any description if defined is included into the generated documentation for the business space version – see Generating Documentation.

Select the type of the document template from the “Type” combo box. Aware IM comes with the following pre-defined types:

  1. Report – the document template represents a report. This type is different from other types of the document templates in the way Aware IM handles it when it creates a document from a document template – see Reports.
  2. Text document – the document template represents an ASCII text.
  3. MS Excel document – the document template represents a Microsoft Excel file (.XLS).
  4. MS Word document – the document template represents a Microsoft Word file (.doc) – this document type is not available under Linux and Mac OS X operating systems.
  5. MS Word document (XML format)
    1. this document type represents an MS Word document saved in the XML format. It can be used as a replacement for MS Word documents on Linux and Mac OS X operating systems if an Aware IM server is running on the above platform and the client browsers are running on the Windows platform. In this case the XML file will be displayed in the browser properly using MS Word.
  6. HTML document – the document template represents an HTML file.

In addition to the pre-defined types it is possible to plug-in custom types – see “Aware IM Programmers Reference”.

note

If a document type is not supported on a particular platform it is possible to define an alternative document that Aware IM will automatically use instead of the original document on the unsupported platform. The alternative document must have the same name as the original document followed by the suffix Alternative. For example, if we defined the document OutgoingLetter of the MS-Word type (not supported on non-Windows platforms) and we want the configured application to work both on Windows and non-Windows platforms we can define the alternative document OutgoingLetterAlternative in the format supported on this platform (for example, plain text). We can define more than one alternative document for different platforms, for example OutgoingLetterAlternativeMac etc.

The options of this property determine the source of data that Aware IM should use when generating documents from document templates. This data is used to replace the contents of tags used in the document template (if any) with the appropriate attribute values (see Document Generation). The following options can be specified:

This option indicates that the data should be determined from the context of the document template usage. For example, the user can select certain instance(s) of a business object and run the report using these instances as the data source. Or some attribute of a business object of the Document type initialises itself with the document template – in this case the document will use the data of this business object’s instance – see Setting Properties of Document Attributes.

This option indicates that regardless of how the document template is used, it will use all instances of the specified business object as its data source. If you select this option you must select the name of the business object as well.

This option indicates that Aware IM should always run the specified query and use the instances of the business objects that it finds as the data source for the document generation. If you select this option you must also specify whether Aware IM should run one of the queries already defined in the business space version (select the “Existing query” radio button and select the query from the combo box) or it should run the query specifically created for this purpose (select the “Custom query” radio button and press the Edit button to define the query – see Adding/Editing Queries).

The options of this property determine whether the document or report will be accessible for viewing/editing by end users – see User Defined Documents and Reports.

If you select the “Report” document type Aware IM will display the Report Designer in the working area of the editor. You can design the layout of the report using the Report Designer.

For all other types of document templates you should create the design of the document using the appropriate software (for example, create Word document using Microsoft Word software) and import this document into the editor (see below).

Importing a layout of a document template can be useful if you want to re-use the same layout in a different document template. Layouts of reports can also be re-used in presentations of business objects and business object groups – see Defining Presentations. To import the existing layout of the document template click on the icon at the top of the editor. Depending on the type of the document template either the File Selection Dialog or the Directory Selection dialog will be displayed. Specify the name of the import file or the directory that contains the single layout file of the appropriate type and any resources (such as images).

Exporting a layout of a document template can be useful if you want to re-use the same layout in a different document template. Layouts of reports can also be re-used in presentations of business objects and business object groups – see Defining Presentations. To export the existing layout of the document template click on the icon at the top of the editor. Depending on the type of the document template either the File Selection Dialog or the Directory Selection dialog will be displayed. Specify the name of the file or the directory to export the layout file and any resources of the document template (such as images for HTML templates or reports) into.

  • Last modified: 2023/04/05 09:09