--- title: "Calculations Tool - Lasernet 9 Form Editor Training Material" slug: "calculations" description: "With the Calculation tool, you can insert calculations in the Conditional Area. In this exercise, we will focus on subtotals and the sum of all item lines." tags: ["Calculations", "Form Editor", "Lasernet 9 "] updated: 2026-03-06T08:16:01Z published: 2026-03-06T08:16:01Z canonical: "kb.lasernetgroup.com/calculations" --- > ## 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 **Applies to:** Lasernet 9 With the **Calculation** tool, you can insert calculations in the Conditional Area. In this exercise, we are going to focus on subtotals and the sum of all item lines. - **Sum**: Generates a rearrange script in the output calculating the sum of all values of the Conditional Rearrange. The rearrange is inserted after the Conditional Area enabled for the current page type. - **Subtotal Current Page**: Generates a rearrange script in the output calculating the sum of all values of the Conditional Rearrange on all pages up to and including the current page. The rearrange is inserted after the Conditional Area enabled for the current page type. - **Subtotal Previous Page**: Generates a rearrange script in the output calculating the sum of all values of the Conditional Rearrange on all pages up to and excluding the current page. The rearrange is inserted before the Conditional Area enabled for the current page type. > [!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 **18. Calculations in Lasernet Developer 9**. Afterward, navigate to the **Forms** section and open the **Sample** form. 1. In the output, switch to the **Last Page** tab. 2. Select the first pattern rearrange of the **Amount** column and edit its **Formats** properties. 3. Select **Amount** in the **Objects** list. 4. Select **Number** as **Format** category. 5. Once you are done, click **Ok**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194241LFHGKYAYKIFPOVS0-image.png) 1. Repeat the same steps to edit the **Formats** properties for the last pattern rearrange in the **Amount** column. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194245LLPYRTSOTFCFJTJ0-image.png) 1. Use the the **Text** tool, to add a fixed text to the footer of the form. Open the **Edit Rearrange** dialog to edit the fixed text object properties. 2. Switch to the **Formats** tab and set **Format** category to **Number**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194251DVPTNEKXCAZKOSF0-image.png) 1. Switch to the **Objects** tab and set **Object type** to **Script**. 2. Type “Sum(Amount);” in the script field. 3. Once you are done, click **Ok**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194257HAWITALYHEDKXAH0-image.png) 1. In the output, select the rearrange specified as [script] you have just added. 2. Set **Font Size** to **18 pt**. 3. Set the **X** position to **196 mm** and **Y** to **280 mm**. 4. Set **Font style** to **Bold**. 5. Align the object right. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194258MNELYMOVCTFRGTV0-image(1).png) 1. Select the object, right-click it, and then set the **Absolute** position to **Last** and **Single**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083489596.png) 1. To view the result of the calculation for the **Amount** column, click **Shift+F5**. Otherwise, on the Menu bar, click **View**, and then click **Run JavaScript**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-ZE62J9W1.png) Following the steps above, you have added the sum to the **Amount** column at the bottom of the last and single pages by manually setting the parameters. Besides, you can use the Calculation tool to automatically add such parameters as object names and number formatting to the selected rearranges. Now proceed with the steps listed below to add subtotals. 1. In the output, switch to the **First Page** tab. 2. Select the **Amount** rearrange. 3. On the toolbar, click **Calculation** and select **Subtotal CurrentPage**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194259JEAEHTJUCLVNGKE0-image.png) Change the **End Y** position to **275 mm** on the **First Page** and the **Middle Page**. The [script] calculation is now positioned inside the box. The **SumSubtotal(Amount)** system script used to calculate the subtotals for the **Amount** column on the **First Page** is added with a unique **Object name** to the bottom of the Conditional Area. The **Format category** property is set to **Number**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194260CHIEYKZRXNBYMDH0-image.png) The **Calculation** tool has added the required parameters to the **Objects** settings. The **Relative** **to** property of the subtotal is set to **Bottom of the Conditional Area** with a **Y** position set to **4.5 mm** (default value). ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/11_position-tab.png) In addition, set the following properties of the subtotal: 1. Specify **5.5 mm** for the **Y** position. 2. Set the **Absolute** position to **First** and **Middle**. 3. Once you are done, click **Ok**. 4. Afterward, set the **Font style** to **Bold**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194261NEHGTOIUBSMISIZ0-image.png) 1. Add a new fixed text rearrange, change its label to **Transfer to next page**. Afterward, set the **Font style** to **Bold**. 2. Edit the position properties of the rearrange by setting **Relative to** to **Bottom of cond. area(Absolute)**. 3. Set **Absolute** position for **First** and **Middle** pages by selecting the corresponding checkboxes. 4. Set the **X** position to **42 mm**. 5. Set the **Y** position to **5.5 mm**. 6. Once you are done, click **Ok**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194262TQPZMHXHXZKALKV0-image.png) 1. In the output, switch to the **Middle Page** tab. 2. Select a rearrange in the Amount column. 3. On the Developer toolbar, click **Calculation**, and then click **Subtotal PreviousPage**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1637660174347.png) The **SumSubtotal(PreviousPage, Amount)** system script used for calculating subtotals for the previous page is added to the top of the Conditional Area. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083490051.png) 1. Set the **Start Y** position on the **Middle** and **Last** pages to **115 mm**. To this end, drag the dotted line to the required position. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-GPG8B47C.png) 1. On the **Position** tab, set the **Y** position to **-3 mm**. 2. Set the **Absolute** subtotal position for the **Middle** and **Last** pages by selecting the corresponding checkboxes. 3. Once you are done, click **Ok**. 4. Afterward, use the Property bar to set the **Font style** to **Bold**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194276CFKVMCUCPMPYYLS0-image.png) 1. Add the **Transfer from previous page** fixed text object. 2. Edit the object properties by setting **Relative to** to **Top of cond. area**. 3. Then, set the **Absolute** position for the **Middle** and **Last** pages. 4. Afterward, use the Property bar to set the **Font style** to **Bold**, the **X** position to **42 mm**, and **Y** to **-3 mm**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194277PFNJBUADVMWYHUO0-image.png) Validate calculated sums by clicking **View** on the Menu bar, and then clicking **Run JavaScript**, or click **Shift +F5**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-VWJ3057X.png) 1. On the Menu bar, click **Sheet**, and then click **Sheet Options**. Switch to the **Format** tab. 2. Select the **Default** profile and click the **Edit** button to replace the current profile with another one. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083489813(1).png) 1. In the **Edit Regional Profile Mapping** dialog, click **Add...** to add a new regional profile. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1628083489377.png) 1. Type a name (US) of a new regional profile. 2. Click the **Import** button. 3. In the dialog box displayed, select **English (United States)** as the default regional profile. 4. Click **Ok** to import the regional profile. 5. Afterward, click **Ok** on every dialog to include in the regional profile to the list. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194278QIQEJTWMVNPKPPJ0-image.png) 1. On the **Sheet Options** dialog, click **Ok** to accept the regional profile you have just added. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4194279JCJGWIKRXIOYMZH0-image.png) Decimal and digit grouping have changed to a new regional format for the rearranges which have **Format category** set to **Number**. You can also apply a definite regional profile to a specific rearrange which overrules the general settings defined for this particular sheet. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-JJ5FM0FR.png) 1. Select rearranges in the **Quantity** column to edit their properties. Open the **Edit Rearrange** dialog and switch to the **Formats** tab. 2. Set **Number** as **Format** category. 3. Switch to the **Output format** tab and select the **Override sheet output format** checkbox. 4. Select the regional profile in the list and click to replace it with the US regional profile. 5. Set **0** as a **Number of decimals** value. 6. Click **Ok** to accept changes. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1637660226480.png) You have now managed to change the number format for a specific rearrange. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-3BA3JDCS.png) ## Attachments - [18.-Calculations.lnconfigx](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/18.-Calculations.lnconfigx)