Sum of Values in Rows Where Checkboxes Are Selected

  • Last update:March 25, 2025
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0

    -

    Problem

    When editing summary reports, how can you dynamically sum only the values in the rows where checkboxes are selected?

    预览.gif

    Implementation Method

    By hiding columns, you can judge if the value in the current can be selected when you select the current row. When the current row is not selected, the value in the row will be assigned to 0, and then you can sum the hidden columns.

    For details, see Selecting All and Batch Operation by JS in a Checkbox Widget.

    Procedure

    Data Preparation

    Create a sheet and create a built-in dataset named Embedded1, as shown in the following figure.

    image 18.png

    Template Designing

    The following figure shows the report design.

    image 19.png

    1. Drag the Number and Quantity fields into cells B2 and C2 respectively, and set the left parent cell of B2 to none.

    2. Right-click cell A2, select Widget Setting, and select Checkbox Widget, and set the left parent cell of A2 to B2.

    3. Enter the formula IF(A2 = TRUE, C2, 0)in cell D2: , and enter the formula  SUM(D2) in cell C3.

    4. Select column D, right-click the column, and select Hide from the toolbox to hide column D, as shown in the following figure.

    image 20.png

    Effect Display

    Save the template and click Data Entry Preview. The effect is the same as that shown in section "Problem."

    You can preview the template on mobile terminals, as shown in the following figure.

    微信图片_20250325100628.png

    Template Download

    Attachment List


    Theme: Parameter
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy