Cell Hiding by Condition Attribute

  • Last update:March 14, 2025
  • Overview

    Expected Effect

    During template creation, you may often need to determine whether to display the content of a certain area (such as a data table, chart, or embedded sub-report) according to a specific condition. How to achieve this effect?

    Example: Taking the Embedded Main-Sub Report as an example, you can add a drop-down box widget to the parameter panel. When you select the Personal Info or Order Info parameter, only the sub-report of Personal Info or Order Info will be displayed. The following figure shows the expected effect.

    Implementation Method

    You can determine whether to hide cells in an area by setting Row Height or Column Width in Condition Attribute for the area.

    Example

    Template Opening

    Open the template Embedded_Prime_Sub_Report.cpt in %FR_HOME%\webapps\webroot\WEB-INF\reportlets\PrimarySubReport.

    Template Parameter Adding

    Choose Template > Template Parameter, add a new template parameter, and rename the parameter Info, as shown in the following figure.

    Parameter Panel Setting

    Enter the parameter editing panel, click Add All to add Info in the right corner of the panel, set the widget to Drop-down Box Widget, select Custom for Data Dictionary, and input the values, as shown in the following figure.

    Condition Attribute Setting

    1. Add a condition attribute for cell A3 where Personal Info is located. When the formula condition $Info='Order Info' is met, the row height will be 0 mm, as shown in the following figure.

    2. Similarly, add a condition attribute for cell A5 where Order Info is located. When the formula condition $Info='Personal Info' is met, the row height will be 0 mm.

    Effect Display

    Save the report and click Pagination Preview. The effect on PC is the same as that shown in section "Expected Effect."

    iconNote:
    Embedded main-sub reports cannot be previewed on mobile terminals. For other reports that can be previewed on mobile terminals, the setting method in this document can be applied and previewed on mobile terminals.

    Template Download

    For details, you can download the template: Cell Hiding by Condition Attribute in an Embedded Main-Sub Report.cpt.

    Attachment List


    Theme: Report Features
    • Helpful
    • Not helpful
    • Only read

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

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

    不再提示

    9s后關閉

    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