Generate documents

With Intrexx, document templates for the following word-processing programs can be generated from application view pages:
Elements used with the Grid element in a responsive layout are not supported in the document generation. VTL Include elements are supported provided they are on the same page that generates the documents, but not in a free layout table there.

1. Install the text editor

To get the full functionality of document generation, a suitable word processing system for processing *.odt files (e.g. Open Office / Libre Office) should be installed. When you create document templates, the program should be open and the program path should be entered in the main menu Extras / Options / General settings / External programs. If you don't specify an external program, you will be reminded of this with a notification when configuring the template generation.

2. Configure the document generation




Create a new application based on the Basic application template.



Open the properties of the All entries page. Activate the setting Use for document generation on the Documents tab. Then click on Create new document.



Enter a template name and then click on Next.



The table, which is on the view page, is already selected for the template context here.



From the table, placeholders are generated which are used as textmarkers in the template.

Buttons on the view page will not be included in the template.

In the Portal properties, you can define presets for the template's layout.

3. Configure a button

So that users can trigger the document generation, you need a button with the action Create Document on the view page configured for document generation.



The generation will attempt to position the elements in accordance with the view page's layout but this cannot be guaranteed. The data from the view page will be placed dynamically in the new document in place of the placeholders. Tables are constructed using Velocity markup here. If your document has a page break, you can decide whether the heading should be repeated. Select the template that should be used to generate the documents when the user clicks on the button. The following output formats can be selected:
If a report is generated by a user in the browser or another end device, the corresponding word-processing program must be open.

Document action

With the process element Document action, a document can be generated when a data record is added or changed; this document can then be saved directly to a data record.