Successfully!

Error!

Widget Introduction

  • Last update:  2023-06-29
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0

    /

    Application Scenarios

    In the application of reports, widgets are often used to achieve different functions. According to usage, widgets can be divided into two categories: data entry widgets and parameter widgets. The widgets used for data entry are data entry widgets, and the widgets used in the parameter interface are parameter widgets. The two widgets are similar, but slightly different in usage. This article introduces documents related to widgets, and you can quickly find the documents you need with this article.

    Note: For details about widget events, see Widget Event.

    Widget Types

    Note:

    1. Widget Name cannot be empty or duplicated and must follow the rules, otherwise it will cause template errors. For details about naming rules, see Parameter Naming Rules.

    2. Input boxes in the attribute interface of widgets do not support HTML such as 控件名称秒翻.png

    Widget Type

    Widget Name

    Introduction

    Help Document

    Parameter widget / data   entry widget

    Text Field

    Used to enter short   texts, usually nicknames, names, and content with few and fixed characters.

    文本控件final.png

    Text   Field Widget

    Text Area

    Compared with Text   Field, Text Area supports line breaks. Used to enter or edit   longer texts like working experience and skills in your CV.

    文本域final.png

    /

    Number

    Used to enter numeric   information (integers, negative numbers, and decimals). Used to enter numeric   data when filling in sales volume or the number of orders.

    数字控件final.png

    Number   Widget

    Password

    During entry, the   entered content will not be displayed directly. Generally used to set   passwords.

    密码控件final.png

    Report   Password Widget

    Button

    Presented as a   button, generally used to click. Add events to the button to trigger report   operations after clicking such as clicking the button to query, submit,   delete, insert a row, expand the report, and so on.

    按钮final.png

    Button   Widget

    Checkbox

    Each button has two   values: tick and not tick. They represent selected and deselected   respectively, which used for yes-or-no questions.

    复选按钮final.png

    Checkbox   Widget

    Radio Button Group

    There can be multiple   buttons, each corresponding to one value, and you can select one from them. Radio   Button Group is used to select one option from multiple ones such as   selecting the leave type.

    单选按钮组final_1686969044.851964.png

    Radio   Button Group Widget

    Checkbox Group

    With multiple   buttons, each corresponding to one value, and you can select multiple ones   from them. Used to select two or more options.

    复选按钮组final.png

    Checkbox   Group Widget

    Drop-down Box

    There can be multiple   values, and you can select one value after collapsing the Drop-down Box.   Used to select one option from multiple ones.

    下拉框final.png

    Drop-down   Box Widget

    Drop-down Checkbox

    There can be multiple   values, and you can select multiple values after collapsing the Drop-down   Checkbox. Used to select multiple options from multiple ones.

    下拉复选框final.png

    Drop-down   Checkbox Widget

    Date

    You can use the Date   widget to enter time data. You can select time in the pop-up.

    日期final.png

    Date   and Time Widget

    Drop-down Tree

    There can be multiple   values. After you collapse one option, you can select a sub-option in a tree   structure.

    下拉树final.png

    Drop-down   Tree Widget

    View Tree

    There can be multiple   values. After you collapse one option, the sub-options are in a tree   structure. Compared with the Drop-down Tree, options in a View Tree   are presented directly.

    View Tree.png

    View   Tree Widget Introduction

    Data entry widget

    File Widget

    Used to upload   attachments such as images, WORD, PDF, and so on.

    文件final.png

    File   Widget

    List Widget

    There can be multiple   option values displayed in a list. You can select one from them.

    列表final.png

    Report   List Widget

    Iframe

    Used to embed other   webpages into reports, such as embedding an official webpage into a report.

    网页final.png

    /

    Parameter widget

    Label Widget

    Used to enter prompts   and headings, but you cannot enter content of the report here. Compared with   the text box, the label widget only has texts without border.

    标签final.png

    /

    Query Button

    After clicking this   button, you can query data. The attributes and buttons are the same, but the   built-in query needs no manual query.

    查询按钮final.png

    /

    Predefined Widget

    Used to customize   complex and reusable widgets. Used to customize your own widgets and you can reuse   them later.

    预定义final.png

    Widget   Manager

    Methods of Binding Widgets with Parameters

    1. When using parameter widgets, after setting global parameters, template parameters, or dataset parameters, you can edit the parameter pane and select Add All to add parameter widgets bound with the parameters.

    参数1final.png

    2. Edit the parameter pane, select the required widget, and set the name of the parameter widget to the corresponding parameter name. For example, set the template parameter to Region, edit the parameter pane, drag the Drop-down Box, and set the widget name to Region.

    参数2final.png

    Notes

    Recommended Browser

    It is recommended to use a browser with Google rendering engine or a higher version of IE browser such as Google Chrome, Microsoft Edge, IE11, and so on. For low version IE browsers, such as IE8 and IE compatibility mode, some widget functions may not be available.

    Data Dictionary Linkage Clearing Widget Values

    With the current functions, when the widget triggers data dictionary linkage, the values of the linked widget will be cleared.

    Parameter Pane Widgets with Widget Values Calculating Data Dictionaries During Initialization

    For parameter pane widgets with data dictionary settings, if there is no default value, the data dictionary will be calculated only when the option is triggered by clicking the widget; if there is a default value, the data dictionary will be calculated during widget initialization. Therefore, setting default values will affect the overall loading speed of the template when the SQL execution speed of the data dictionary is slow.

    advanced real final.png

    Returning to the Last Input Value If Entered Values Not Complying with the Verification Rules of Text Field and Number Widget

    For Text Field or Number widgets with verification rules, when the input value does not meet the rules, there will be a prompt, and the current input value will be cleared, returning to the last input value.

    Widget Data Dictionary Losing Numeric Precision

    Problem Description

    Note: For FineReport of 11.0.6 and later versions, the numeric precision of widget data dictionaries is improved, and the following problem will no longer occur.

    When the field type used in the widget data dictionary is numeric such as bigint, there may be a problem of losing precision.

    Advanced final.png

    Solution

    You need to convert numeric data into strings. The following figure shows how to convert in SQL.

    SQL final.png

     


    Attachment List


    Theme: Parameter
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback