View Tree Widget

  • Last update:  2023-10-23
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0

    /

    11.0.6

    • Renamed Async Load in parameter widgets to Asynchronously Expand Tree Node. The asynchronous loading logic is unified after you set default values. For details, see section "Widget in Parameter Panel" in "Widget Introduction".

    • If you use the automatic construction method to build a view tree, the parent node of the root node of the tree dataset can be non-empty.

    11.0.7

    • Renamed Async Load in data entry widgets to Asynchronously Expand Tree Node. The asynchronous loading logic is unified after you set default values. For details, see section "Widget in Data Entry Report" in "Widget Introduction".

    • Added the settings Returned Value's Type. For details, see attribute tables in section "Attribute".

    • Optimized the default value setting method. You can set default values of view trees without entering complete paths. For details, see section "Widget in Parameter Panel" in "Widget Introduction".

    Application Scenarios

    Widget in Data Entry Report

    You can select data with multi-level tree structures and enter the data in data entry reports through the view tree widget, as shown in the following figure.

    Note:
    Filling and linkage are not supported in view trees.

    Widget in Parameter Panel

    You can select data with multi-level tree structures and enter query parameters on the parameter panel through the view tree widget.

    How to Add

    Widget in Data Entry Report

    After you select a cell, click Widget Setting on the right and select View Tree from the dropdown menu.

    Widget in Parameter Panel

    Drag the View Tree widget from the widget toolbar into the parameter panel.

    Notes

    1. Difference between the view tree and the drop-down tree:

    They have different display effects on browsers during preview. The setting of view tree is the same as that of drop-down tree.

    2. Comparison of three different ways to build a view tree is shown in the following table.


    Fast Layered Creation

    Automatic Creation

    Basic Layered Creation

    Number of Required Datasets

    One or multiple

    One

    Multiple

    Required Dataset Type

    General dataset

    Tree dataset

    General dataset

    Required Data Structure

    Multiple column fields with corresponding relationships, in which dependencies must be set.

    A column or two columns of fields with corresponding relationships, in which multiple root nodes and complete tree relationships exist.

    Note:
    Parent node of a root node must be empty in FineReport V11.0.6 and earlier versions.

    Multiple column fields with corresponding relationships, which need to be filtered through the treelayer function in SQL.

    Performance

    Better than Basic Layered Creation generally

    Automatic Creation cannot be compared with the other two creation methods due to its unique data structure.You are advised not to check Asynchronously Expand Tree Node if the data volume is large and all nodes need to be selected.

    You can select Basic Layered Creation in the case of large amounts of data, with Performance First and Asynchronously Expand Tree Node being checked.
     
     

    Widget Introduction

    Attribute

    Widget in Data Entry Report

    The attribute setting page of the view tree widget is shown in the following figure.

    The following table introduces the settings of each attribute in detail.

    Note:
    You can set default values by adding values in cells when using the view tree widget for data entry. The setting method is the same as that of the drop-down tree widget. For details, see Drop-down Tree Default Value Setting.

    Classification

    Settings

    Introduction

    Basic

    Widget Name

    Name (empty by default) of the widget

    It is manually entered and usually used in conjunction with parameters (such as passing the widget value to the corresponding parameter after the widget is got through Widget Name).

    Available

    Determines whether the widget is available. 

    • Checked (default): Widget can be edited during data entry. 

    • Unchecked: Widget is gray and cannot be edited during data entry.

    Visible

    Determines whether the widget is visible. 

    • Checked (default): The widget is displayed on the page during data entry.

    • Unchecked: The widget is not displayed on the page during data entry.


    Tree Creation

    Allows you to define actual value and display value of the view tree widget. Three creation methods are supported, including Automatic Creation, Basic Layered Creation, and Fast Layered Creation.

    1. Automatic Creation: automatically creates a view tree based on the hierarchical relationship of the tree dataset, requiring no definition of data layer by layer.

    2. Basic Layered Creation: defines the view tree layer by layer through the data dictionary using the layer parameter. That is to say, take the values from the previous layer as parameter values to filter data of the next layer.

    If you select Basic Layered Creation, the option High Performance (unchecked by default) is provided. Checking it can improve loading efficiency.

     

    Checked: If there are no child nodes under a directory, the + icon is still displayed, and no data is displayed after you expand the directory.

    3. Fast Layered Creation: defines the hierarchy of the view tree through datasets. Unlike Basic Layered Creation, data is arranged by category in this creation method, with each layer bound to a data column, thus requiring no layer parameter.

    Note:
    You cannot adjust the font size and color of options in the data dictionary by setting those of cells.

    Multiselect

    • Checked: Multi-options can be selected from the view tree widget during data entry. 

    • Unchecked (default): Only one option can be selected during data entry.

    Asynchronously Expand Tree Node

    Note: 
    In FineReport of versions earlier than V11.0.7, it was called Async Load.

    Node loading logic, which affects performance. It is checked by default.

    Checked: Only data of parent nodes are loaded and all child nodes remain collapsed by default after you expand options, which is suitable for cases with large amounts of data. If there is a default value for the widget, the default value node is expanded and selected by default, while other nodes are not expanded.

    Unchecked: All child nodes are expanded at once after you expand options, which is suitable for cases with small data volume. If there is a default value for the widget, all child nodes are expanded at once and default value node is selected.

    Return Only Leaf Node

    Determines whether child nodes are selected automatically after parent nodes are selected in multiselect scenarios.

    Checked (default): Child nodes are selected automatically when parent nodes are selected.

    Unchecked: Child nodes are not selected automatically when parent nodes are selected.

    Note:
    Return Only Leaf Node is a setting item for multi-select view trees, which does not take effect for single-select view trees.

    Return Full   Hierarchical Path

    View tree is a widget with hierarchical structures. Each leaf node has its full hierarchical path. This option determines whether to return the full hierarchical path after a value is selected. The returned value is the array-type data.

    Checked: Full paths are returned. For example, select Director, and returned values are Headquarter, Marketing department, and Director.

    Unchecked: Only the leaf node is returned. For example, select Director, and the returned value is Director.

    Returned Value's Type

    Note:
    This function is added in FineReport V11.0.7.

    This option appears only when Multiselect is checked and Return Full Hierarchical Path is unchecked. This option is used to set the format of the return value for multi-select view trees, including Array and String formats.

    If Return Full Hierarchical Path is checked, the returned value's type is determined. In this case, there is no option Returned Value's Type.

    1. Array: Returned value is an array. For example, select three values and returned values are "Value 1", "Value 2", "Value 3".

    2. String: Returned value is a string, in which separator, initializer, and terminator need to be defined. That is to say, multiple selected values are concatenated into a single string through the separator. For example, in the English input mode, separately set Separator to Comma and Initializer and Terminator to Quotes. The returned value is 'Value 1, Value 2, Value 3'.

    Validation

    Allow Null

    Determines whether to allow empty for the widget. 

    Checked (default): The widget allows no selection. 

    Unchecked: A prompt appears during data entry validation and submission if no option is selected.

    Error Tip

    This setting item appears if Allow Null is unchecked, allowing you to customize the prompt message. The default message is Can not be null.

    Widget in Parameter Panel

    The attribute setting page of the view tree widget is shown in the following figure.

    The following table introduces the settings of each attribute in detail.

    Classification

    Settings

    Introduction

    Basic

    Widget Name

    Name (defaulting to treeEditor#) of the widget It is manually entered and usually used in conjunction with parameters (such as passing the widget value to the corresponding parameter after the widget is got through Widget Name).

    Available

    Determines whether the widget is available. 

    • Checked (default): Widget can be edited during data entry. 

    • Unchecked: Widget is gray and cannot be edited during data entry.

    Visible

    Determines whether the widget is visible. 

    • Checked (default): The widget is displayed on the page during data entry. 

    • Unchecked: The widget is not displayed on the page during data entry.

    Advanced

    Label Name

    This setting item is used to add labels for view tree widgets on mobile terminals because mobile application does not support Label Widget on the parameter panel, but recognize the Label Name attribute of ordinary widgets.

    Widget Value

    Default value when the widget is initialized, which can only be set with formulas or left empty

    Note:
    In FineReport of versions earlier than V11.0.7, the default value of the view tree must include the complete path of the node actual value. In FineReport V11.0.7 and later versions, the TREEDEFAULTPATH function is added, allowing you to set the default value without entering the complete path.

    Formula: Formulas supported by the designer. For example, the value of cell A1 is written as below.

    If the value corresponding to the formula meets multiple value formats, multiple options are selected. 

    For example, single-option: [1,11,111] 

    multiple options: [[1,11,111],[1,11,112]]

    The effect is shown in the following figure.

    Data Dictionary

    Allows you to define actual value and display value of the view tree widget. Three creation methods are supported, including Automatic Creation, Basic Layered Creation, and Fast Layered Creation.

    1. Automatic Creation: automatically creates a view tree based on the hierarchical relationship of the tree dataset, requiring no definition of data layer by layer.

    2. Basic Layered Creation: defines the view tree layer by layer through the data dictionary using the layer parameter. That is to say, take the values from the previous layer as parameter values to filter data of the next layer.

    If you select Basic Layered Creation, the option High Performance (unchecked by default) is provided. Checking it can improve loading efficiency.

    Checked: If there are no child nodes under a directory, the + icon is still displayed, and no data is displayed after you expand the directory.

    3. Fast Layered Creation: defines the hierarchy of the view tree through datasets. Unlike Basic Layered Creation, data is arranged by category in this creation method, with each layer bound to a data column, thus requiring no layer parameter.

    Watermark

    Displays light gray watermark texts in widgets during data entry. Content (empty by default) can be manually entered to prompt users for the required information. It disappears if you click the widget editing area.

    Font Size

    The setting is reused from the drop-down tree and does not take effect for the view tree currently.

    Multiselect

    • Checked: Multi-options can be selected from the view tree widget during data entry. 

    • Unchecked (default): Only one option can be selected during data entry.

    Asynchronously Expand Tree Node

    Note:
    In FineReport of versions earlier than V11.0.6, it was called Async Load.

    Node loading logic, which affects performance. It is checked by default.

    Checked: Only data of parent nodes are loaded and all child nodes remain collapsed by default after you expand options, which is suitable for cases with large amounts of data. If there is a default value for the widget, the default value node is expanded and selected by default, while other nodes are not expanded.

    Unchecked: All child   nodes are expanded at once after you expand options, which is suitable for cases with small data volume. If there is a default value for the widget, all child nodes are expanded at once and default value node is selected.

    Return Only Leaf Node

    Determines whether child nodes are selected automatically after parent nodes are selected in multiselect scenarios.

    Checked (default): Child nodes are selected automatically when parent nodes are selected.

    Unchecked: Child nodes are not selected automatically when parent nodes are selected.

    Note:
    Return Only Leaf Node is a setting item for multi-select view trees, which does not take effect for single-select view trees.

    Return Full   Hierarchical Path

    View tree is a widget with hierarchical structures. Each leaf node has its full hierarchical path. This option determines whether to return the full hierarchical path after a value is selected. The returned value is the array-type data.

    Checked: Full paths are returned. For example, select Director, and returned values are Headquarter, Marketing department, and Director.

    Unchecked: Only the leaf node is returned. For example, select Director, and the returned value is Director.

    Returned Value's Type

    Note:
    This function is added in FineReport V11.0.7.

    This option appears only when Multiselect is checked and Return Full Hierarchical Path is unchecked. This option is used to set the format of the return value for multi-select view trees, including Array and String formats.

    If Return Full Hierarchical Path is checked, the returned value's type is determined. In this case, there is no option Returned Value's Type.

    1. Array: Returned value is an array. For example, select three values and returned values are "Value 1", "Value 2", "Value 3".

    2. String: Returned value is a string, in which separator, initializer, and terminator need to be defined. That is to say, multiple selected values are concatenated into a single string through the separator. For example, in the English input mode, separately set Separator to Comma and Initializer and Terminator to Quotes. The returned value is 'Value 1, Value 2, Value 3'.

    Validation

    Allow Null

    Determines whether to allow empty for the widget. 

    • Checked (default): The widget allows no selection. 

    • Unchecked: A prompt appears during data entry validation and submission if no option is selected.

    Error Tip

    This setting item appears if Allow Null is unchecked, allowing you to customize the prompt message. The default message is Can not be null.

    Allow Edit

    The setting is reused from the drop-down tree and does not take effect for the view tree currently.

    Allow Custom Value

    The setting is reused from the drop-down tree and does not take effect for the view tree currently.

    Coords & Size

    Widget Location

    Widget location on the parameter panel, displayed automatically based on horizontal and vertical coordinates which can be adjusted here.

    Widget Size

    Size of the widget, which can be adjusted by changing the value of width and height or by dragging the widget.

    Event

    On the event setting page, you can achieve some effects by adding triggering events including After Initialization, Click, and Node Generation.

    After selecting an event type, you can add the event content. The event response methods supported by the view tree widget include JavaScript, Summit to Database, and Send Email, Export Event, and Mobile Pop-up.

    Select the corresponding event response method.

    Mobile Terminal

    View tree widgets are supported on mobile terminals.

    Application Example

    The following table introduces the application scenario of the view tree widget and corresponding document.

    Application Scenario

    Effect

    Scenario:

    View tree nodes are displayed on the left, and the corresponding report content is displayed based on the selected node.

    Document:

    View Tree Expansion

     

    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