--- title: "Calculations (Grouping) - Lasernet 9 Form Editor Training Material" slug: "calculations-grouping" description: "You can use the Calculation tool to calculate groups of item lines in the Conditional Area. Read the article for more information." tags: ["Calculations", "Form Editor", "Grouping", "Lasernet 9 "] updated: 2026-03-06T08:15:17Z published: 2026-03-06T08:15:17Z canonical: "kb.lasernetgroup.com/calculations-grouping" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt > Use this file to discover all available pages before exploring further. # Calculations (Grouping) **Applies to:** Lasernet 9 You can use the **Calculation** tool to calculate groups of item lines in the Conditional Area. Selecting the **Sum Group** option of the **Calculation** tool allows creating a new script rearrange that sums over all values of rearranges selected within a group. By default, the script rearrange is inserted relative to the last instance of the group. > [!NOTE] > Note > > This article describes a software version that is no longer supported. Although the software will no longer receive updates or technical support, existing documentation, such as this article, will be retained for reference purposes but will no longer be updated. If you have any questions, contact [Lasernet Support](https://support.lasernetgroup.com/new-ticket). ## Exercise Download and import the attached configuration called **19. Calculations (Grouping) in Lasernet Developer 9**. Afterward, navigate to the **Forms** section and open the **Sample** form. 1. Select rearranges in the **Amount** column and open the **Edit Rearrange** dialog. Switch to the **Objects** tab. 2. Type **Amount** as **Object name**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083603726.png) 1. Switch to the **Formats** tab and select **Number** as **Format category**. 2. Click **Ok** to confirm changes. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083603085.png) 1. On the Developer toolbar, select the **Pattern** tool. 2. In the input, click the **/Root/Body/ItemGroup** node. 3. Switch to the **Output** tab in the **Pattern Properties** dialog. 4. Select the **Group until** checkbox. 5. Set **Additional progress** to **10 mm**. 6. Click **Ok** to confirm changes. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083605776.png) The item lines are now divided into three groups with a progress of 10 mm between each group [1]-[3]. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083607346.png) 1. On the Developer toolbar, select the **Rearrange** tool. 2. In the input, click the **/Root/Body/ItemGroup/Description** node. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083607100.png) 1. On the Property bar, set **Font size** to **13 pt**, the **X** position to **42 mm** and the **Font style** to **Bold**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083606035.png) 1. Select the first rearrange in the **Amount** column. 2. On the Developer toolbar, select the **Calculation** tool, and then click **Sum Group**. A script rearrange used for calculating totals for a group of patterns is added to the bottom of each group. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-UB3JOG0Q.png) The **SumGroup(Amount)** system script is used to calculate the rearrange group total. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083602854.png) The **Relative to: Bottom of group** and the **Group: ItemGroupGroup** (a user can define a name for a group) parameters are used to bind rearranges at the bottom of the required group. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083602381.png) 1. On the Menu bar, click **View**, and then click **Run JavaScript**, or click **Shift + F5** to view the result of group calculations. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-K556G5CG.png) 1. On the Developer toolbar, select the **Text** tool to add a fixed text to the output. 2. Open the **Edit Rearrange** dialog and switch to the **Position** tab. 3. Set **Relative to** to **Bottom of group** and **Group** to **ItemGroupGroup**. 4. Click **Ok** to confirm changes. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083606514.png) 1. Select text objects you have added and right-click the selection. On the context menu, click **In-place edit** to edit the text. Type “Subtotal”, and then click **F2** or **Ctrl + Enter** to exit the edit mode. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-63SSNTNV.png) 1. Afterward, set the **X** position of the selection to **42 mm**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-85LKDBMX.png) 1. Select the **Subtotal** text and **[script]**. Set the **Y** position of the selection to **4.5 mm**, as well as the **Font style** to **Bold**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-O52RIZPE.png) 1. On the Developer toolbar, click **Shape**, and then click **Line**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-1SSWEKE5.png) 1. Add a line to the output as illustrated: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-X6NDGSKO.png) 1. For the added line, set the following properties: the **X** position - **162.5 mm** and **Y** - **1 mm**, **Relative to** - **Bottom of group** and **Group** - **ItemGroupGroup**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083607869.png) A line is added at the bottom of the group just above the subtotal. 1. To complete the design you can insert the total sum for the **Amount** column. To this end, use the **Text** tool to create a new text object. Edit the object properties by setting **Object type** to **Script**, **Format category** to **Number**, **Script** to **Sum(Amount)**, **Font size** to **18 pt**, the **X** position to **196 mm**, the **Y** position to **281 mm**, and the **Font type** to **Bold**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-KI6JNYRN.png) ## Attachments - [19.-Calculations-Grouping.lnconfigx](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/19.-Calculations-Grouping.lnconfigx)