Generate Document
Introduction
The Generate document activity is used to write a document to a file, based on a document template.
For more information on which types of documents can be created, see Document Type.
Properties
There are two sets of properties for this activity, those in the dialog box on the left, and those in the properties pane on the right:
The Generate document properties pane consists of the following sections:
Action Section
The Action section of the properties pane shows the action associated with this activity.
You can open a dialog box to configure this action by clicking the ellipsis (…) next to the action.
You can also open the dialog box by double-clicking the activity, or right-clicking the activity and selecting Properties.
File
The name of the file document that will contain the generated document. It should be an object of entity System.FileDocument or its specialization.
Language
The language in which the titles and labels of the document should appear is described in the table below:
Option | Description |
---|---|
Current user (default) | Use the language of the current user. |
Project default | Use the default language that is specified in the App Settings. |
Variable | Use the language stored in the selected object, which must be of type System.Language. |
Document Type
The document type specifies the type of the generated document.
Option | Description |
---|---|
HTML | Generate a document in HTML format. |
Generate a document in PDF format. | |
Word 2007 | Generate a document in Word 2007 format. |
Word 2003 | Generate a document in Word 2003 format. |
Rich-text format | Generate a document in Rich-text format. |
ODT | Generate a document in Open Office (ODT) format. |
Override Margins
Override margins allows you to set custom margins for your documents. By using variables, these can be defined at runtime.
Template
Template defines which document template is used to generate the file. Depending on the selected document template one or more arguments need to be specified.
Arguments
Depending on the selected document, you will see a list of its arguments in a table. Arguments pass data to the activity.
Widget
The name of the widget in the document template that needs arguments to be passed to it. This property is read-only.
Type
The type of the argument used in the document template that is read-only.
Argument
The Edit argument button allows you to edit the argument value. An argument is the input data that you are passing to the document template. For each document template parameter (for each non-nested data view and data grid), you must supply an argument of the same type. The values of the arguments are expressed using expressions.