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
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. | |
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. | / | |
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. | ||
Password | During entry, the entered content will not be displayed directly. Generally used to set passwords. | ||
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. | ||
Checkbox | Each button has two values: tick and not tick. They represent selected and deselected respectively, which used for yes-or-no questions. | ||
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. | ||
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. | ||
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. | ||
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. | ||
Date | You can use the Date widget to enter time data. You can select time in the pop-up. | ||
Drop-down Tree | There can be multiple values. After you collapse one option, you can select a sub-option in a tree structure. | ||
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. | ||
Data entry widget | File Widget | Used to upload attachments such as images, WORD, PDF, and so on. | |
List Widget | There can be multiple option values displayed in a list. You can select one from them. | ||
Iframe | Used to embed other webpages into reports, such as embedding an official webpage into a report. | / | |
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. | / |
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. | / | |
Predefined Widget | Used to customize complex and reusable widgets. Used to customize your own widgets and you can reuse them later. |
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.
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.
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.
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.
Solution
You need to convert numeric data into strings. The following figure shows how to convert in SQL.