This article describes how to create a group of patterns in the Form Editor starting at the instance of a pattern and ending when meeting the same or another defined pattern. This is useful if you want to group a list of item lines and perform unique actions in the start or at the bottom of the group. For example, an action could be to insert a text, shape or run a calculation.
In the following example input data contains detail lines, which must be grouped based on the contents of the line type.
Because all detail lines have the same Xpath "/Report/DatasetTable1/Grouping1_0_Collection/Grouping1_0/Detail_Collection/Detail", we will use the contents of the LineType as a part of the Xpath to differ between headers (A) and lines (O).
1. Select the Pattern tool to display the Pattern Properties window.
2. Click the Output tab, select the Group until checkbox and set Match to the same value as that defined for your Pattern Name/Criterion in the input settings of the pattern.
3. In Additional progress, set the value to 10 mm to insert additional space between groups.
Any further patterns will now be included in the group until a new line type A is matched.
4. Click value O for element FIELD_PBS_AgreementLineTmp_LineType to create a pattern recognizing item lines.
5. Select the Rearrange tool.
6. Click the elements for LineType and ItemId for LineType A and drag the values to the position required for the headings.
7. Click the elements for LineType, ItemId and Qty for LineType O and drag the values to the position required for the item lines.
8. Select the object containing the quantity in the output view to summarize the column.
9. Select the Calculation tool -> Sum Group option (icon is active when a column is selected).
A new script function object named SumGroup() will automatically be added relative to Bottom of group.
10. Select Insert Text tool and Shape, Create Lines, Shapes and then the Lines tool to add a total text and line in Bottom of group.
11. In the output properties for both objects, click the Relative tab and set Relative to value Bottom of group.
12. Set Group value to the group name available in the group list.
The item lines are now grouped based on line type with a unique design for header, item lines and the bottom of the group.
Add a comment
Please log in or register to submit a comment.