Skip to main content

TXT (Add New Rearrange, Conditional Area and Pattern) - Knowledgebase / Lasernet / Lasernet Training / Lasernet Form Editor 9 - XLS, CSV and TXT Input - Formpipe Support Portal

TXT (Add New Rearrange, Conditional Area and Pattern)

Authors list


Doing the current exercise, you are proposed to add a new rearrange and a new pattern, as well as define a conditional area to the input of the TXT format.

The Rearrange tool is one of the most important functions in Lasernet Form Editor. It is used to define variables in the input data files and map them to the output form fields.

Using the Conditional Area function, it is possible to define areas in the input files to include them to the print when certain conditions are satisfied. This can be used to recognize invoice or order lines in the corresponding documents.

Patterns are used within conditional areas to recognize specific line items. For example, a pattern is used to identify various data elements contained in an invoice or order line.

Exercise

Download and import the attached configuration called 04. TXT (Add New Rearrange, Conditional Area and Pattern) in Lasernet Developer 9. Afterwards, go to the Forms section and open the Sample form.

Once you are done, follow the steps listed below:

1. Add a conditional area. To this end, click the Conditional Area tool on the Developer toolbar. When a pointer becomes a cross, mark the desired area of the input data file.


At the mouse release, the conditional area is added and highlighted in the input.


Continue with adding patterns to the conditional area. Patterns are used within conditional areas to recognize specific line items. For example, you are proposed to add a pattern to identify elements containing invoice items. To this end, follow the steps listed below.

2. On the Developer toolbar, click Pattern.

3. In the Pattern mode, a panel is shown on the right-hand side. Click the Add button to add a pattern.

4. Open the pattern for editing. To this end, select a pattern, and then click the Edit button. Otherwise, right-click the selected pattern, and then click Edit on the context menu that appears, or just double-click the pattern.

5. In the Pattern Properties dialog, type a new name (Pattern 1) for the pattern, and then click OK to save changes and close the dialog.


6. Click Line Criterion to set a criterion for the pattern you have just added.

7. Once a pointer becomes a cross, draw a rectangle around the first element in the Unit price column, taking 1 symbol before a decimal separator and 2 symbols after it.


8. At the mouse release, the Pattern Criterion dialog opens.

9. In the Match field, type 9,99, where each 9 indicates a number from 0-9. It is a wildcard.

As a result, you can see only lines containing invoice items are highlighted in green in the input.

10. On the Pattern panel, add one more pattern with the Pattern 2 name.

11. On the left side of the input, click a light green pattern marker. The pattern marker is used as a guideline while defining a pattern. Drag the marker till the second line which does not contain invoice items, so you can include the first empty line to the selected area.

12. Click Line Criterion.

13. Once a pointer becomes a cross, draw a rectangle around the first empty elements in the line, including the 1st symbol of the 1st word.

14. At the mouse release, the Pattern Criterion dialog opens. In the Match field, type X after space symbols, where X indicates a letter, not numbers and spaces. It is also a wildcard.

15. Once you are done adding and editing patterns, click the Back button to exit the Pattern mode.

It is the right time now to add rearranges: both absolute and conditional. The latter is added to the pattern.

16. On the Developer toolbar, click Rearrange.

17. Once a pointer becomes a cross, draw a rectangle around the first element in the Item number column.


18. At the mouse release, all the elements of the Item number column are selected within the pattern. Click the selection. As a result, the rearrange is shown in the output.


19. Set the X position of the rearrange added to the output to 15 mm. To this end, open the Edit Rearrange dialog on the Position tab. Otherwise, you can drag the rearrange to the required position.


Afterwards, add more rearranges (Description, Quantity, Unit price and Amount) belonging to the same pattern, and locate them in the output as shown on the picture below.


20. On the Developer toolbar, click Rearrange. Once a pointer becomes a cross, draw a rectangle around the first five lines in the input as it is shown on the picture below.

As you can see, lines do not belong to any pattern meaning you are adding an absolute rearrange. At the mouse release, the rearrange is added to the output.


21. Open the Edit Rearrange dialog on the Position tab, and set the position properties as shown on the picture below.

You have used the input of the TXT format to define a conditional area, add 2 patterns to it as well as several conditional rearranges belonging to a pattern. In addition, you have added an absolute rearrange and defined an absolute and X-Y positions for it. As a result, your output looks as follows:


Helpful Unhelpful

1 of 1 people found this page helpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?

Share