- Print
- PDF
Add Input Data to a Sheet (Rearranges)
The rearrange tool is one of the most important functions in Lasernet Form Editor. It is used to define input variables in the input data files and map them to output fields in forms.
You activate the rearrange tool by clicking the Rearrange button in the toolbar.
Create a Rearrange
The way that you create a rearrange depends on the form’s input data type.
Refer to the information that corresponds to the form’s input data type:
Text input data
Activate the rearrange tool and select an area in your input data file by drawing a box around the text. The selected area will be highlighted in blue (symbolizing a rearrange) and a corresponding field will be added to your form on the right side of the Lasernet Form Editor for the EMF output. For XML output you must manually drag to a node.
XML input data
Activate the rearrange tool and click an element within the XML input data. The element will be highlighted and (for most output types) a corresponding field will be added to your form design. However, for XML output (including PDF Form (Filled) output) you must manually drag the rearrange to a node.
In the above example, an XML tag named ‘CityName’ has been marked as a rearrange. You can then access the input properties of the rearrange by right-clicking it and choosing Properties from the menu. The properties are essentially the same as for non-XML input files, except for the position information which is irrelevant in XML.
Rich-Text-Based DOCX, PDF, and XHTML Output
For these types of output, you do not create rearranges. Instead, you add fields from the DataSet formatted input to the form design, where they act as mail-merge fields. For instructions, see Add Fields to Rich-Text-Based DOCX, PDF, and XHTML Output.
XLSX Spreadsheet Output
For XLSX spreadsheet output, you do not create rearranges. Instead, you add fields from the DataSet formatted input to the form design, where they act as mail-merge fields. For instructions, see Add Fields to XLSX Spreadsheet Output.
Rearrange Properties
To modify the properties of the rearrange (for example, change the font and text size), see Edit Rearrange Properties.
Several Patterns Matching the Lines
If there are one or more patterns matching the lines you wish to select after clicking the Rearrange tool, you can press Shift prior to releasing the mouse (or, for XML input, before clicking the mouse on an XML element). A context menu is then displayed showing all patterns matching the selected line. Select the desired pattern to create conditional rearrange or select Sheet to create an absolute rearrange.
Instance Qualifiers
When you work with conditional rearranges, you can use the Instance(s) qualifiers option. It allows you to extend pattern expressions with the ability to specify:
All instances (the option is selected by default),
First instance,
Middle instance(s) which are all non-first and non-last,
Last instance,
Single instance which is the only one existing line of the pattern
of:
All instances of the pattern (the option is selected by default),
All consecutive instances of the pattern,
All instances of the pattern within a region,
All instances of the pattern within a group.
Note
The controls for the Instance(s) qualifiers group box are disabled if the settings are already specified for the pattern to which the rearrange(s) belong.
Note
Instance qualifiers are only supported for conditional rearranges added to a pattern. They are not applicable to rearranges added to an absolute fixed position.
Render XHTML Within Input Data
Lasernet can read XHTML within input data and render the XHTML in the output. Select the XHTML checkbox on the General page of the Edit Rearrange window.
The following tags are supported:
The text between
<p>
and</p>
describes a paragraph.Hyperlinks are defined with the
<a>
tag:<a href="url">hyperlink text</a>
The
<b>
tag specifies bold text.The
<u>
tag represents some text that should be stylistically different from normal text (underlined).The
<i>
tag is usually displayed in italic.
Using this description, Lasernet can display a document with headings and paragraphs.
Rearranges in XML Format Output
When you produce XML files, the output properties of a rearrange are identical to the structure of the XML file and the input rearranges are mapped to tags in the output XML file.
The example illustrates how data contained in an input text file is mapped to a tag in an output XML file using rearranges.
Add a Rearrange to PDF Form (Filled) Output
To add data from the input into the output data structure, you must create rearranges in the XML input data (as described) above, and then use those rearranges in the output data structure.
Add rearranges to the input, and then drag them to the output to fill the fields (interactive elements), as needed.
Add Fields to Rich-Text-Based DOCX, PDF, and XHTML Output
To add mail-merge fields to the design of forms that create these types of output, follow these steps:
Add required fields to the output from the input by dragging them. We recommend that you drag the fields from the table where the Use for Mail Merge option is selected first. These fields are then inserted as inline text.
You can then drag fields belonging to the nested table. To do this, select the required fields on the nested table by holding down the Ctrl key while clicking your mouse button on each field you want to add. Those fields are then added to the output in the order you have selected them.
In addition, you can also drag the whole nested table.
You can also define or re-define settings for fields you have added to the output using the Properties button on the Field bar. To do this, highlight the item (field) for which you want to edit the properties. The Properties button then becomes available on the Field bar. Click it and then specify the required properties.
Add Fields to XLSX Spreadsheet Output
To add mail merge fields to the spreadsheet, select a cell in the template and then double-click a field in the input which contains the value you want to insert into the selected cell. Repeat the same action for each cell you want to fill in with the required field value.
Cells in the Detail range have to be filled in with field values from the master detail table. Cells in DetailLevel0 have to be filled in with field values from the nested table.
The output should then look like the image below:
In addition to adding input data to the spreadsheet, you could style various elements of the spreadsheet, and add calculations and images to the sheet.