Successfully!

Error!

Date Widget

  • Last update:  2023-07-31
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0

    /

    11.0.5

    Supported year widget and merged the original year selection widget into the Date widget.

    Optimized the widget function. Users are reminded when the format of the input widget is not supported.

    For details about format attributes, see section "Widget Introduction".

    11.0.11

    In the drop-down list of the current month's dates, you can select dates that are not in the current month. For details, see section "Notes".

    Application Scenarios

    Widget in Data Entry Report

    Select a date to fill in the report.

     

    Widget in Parameter Panel

    Add date query widgets to the report, and you can query report data within a specified date range.

    How to Add

    Widget in Data Entry Report

    After selecting the cell, click Widget Setting on the right and select Date from the dropdown menu.

     

    Date Widget in Parameter Panel

    Drag the Date widget from the parameter panel widget toolbar into the parameter panel.

     

    Notes

    1. To meet the usage habits of domestic and foreign users, the Date widget provides a week switching function.

    When using the Date widget in the browser, you can set Mon or Sun as the first day of a week by clicking Mon or Sun respectively. You can change the week mode as needed.

    The week number of the date in the Date widget will also change according to the selected week mode.

    2. If the date widget is set to linkage, any operation on the date selection interface (like page turning or switching months and years) will trigger the linkage effect in real time. Therefore, if the speed of single linkage is slow, frequent clicking to switch may cause the page to freeze.

     

    3. In the Date widget drop-down options, non-current month date options appear in gray and cannot be selected by clicking.

    iconNote:
    In FineReport 11.0.11 and later versions, though the non-current month options in the drop-down menu are grayed out, they can still be selected.

     

    Widget Introduction

    Attribute

    Widget in Data Entry Report

    After adding the Date widget, you can set the attributes of the date widget in the bottom right corner.

     

    The detailed introduction of each attribute setting item is as follows.

    iconNote:

    1. When using the Date widget in the report, you can set a default value by entering a date value in the cell, such as 2021-06-21.

    2. When assigning values to the Date widget, such as default value, start date, and end date, you are advised to use the date format yyyy-MM-dd for accurate recognition.

    Classification

    Settings

    Introduction

    Basic

    Widget Name

    Name of the widget

    It is manually entered, usually used in conjunction with parameters (such as getting the widget value through the widget name and passing the value to the corresponding parameter).

    The default is empty.

    Enabled

    Whether the widget is enabled

    When it is ticked, the widget can be edited during data entry.

    When it is unticked, the widget is grayed out and cannot be edited during data entry.

    The default is being ticked.

    Visible

    Whether the widget is visible

    When it is ticked, the widget is displayed on the page during data entry.

    When it is unticked, the widget is not displayed on the page during data entry.

    The default is being ticked.

    Advanced

    Format

    The supported input formats for the date widget are Date and Time.

    The default is Date.

    Date: allows defining the query date format within the range of year, month, and day.

     

    Time: allows defining the query date format within the range of year, month, day, hour, minute, and second.

     

    You can modify the date format to transform the display style of the date widget. For example, modify the format to yyyy-MM to display the widget in a year-month style.

    iconNote:
    FineReport 11.0.5 and later versions allow displaying a year widget by setting the format to yyyy.

    You can select a format from the drop-down menu or directly enter a format. When the entered format is not supported, the sample box will display a red warning message as shown in the following figure.

    Start Date

    Start date of the selectable date range for the widget, namely the earliest date that can be selected

    After Start Date is set, data outside the range is grayed out and cannot be selected.

    There are three types (default to None):

    1. None: no limitation

    2. Date: allows selecting a specific date.

    3. Formula: allows directly entering the formula. For example, if cell A1 is a date value, enter A1 in Formula, and the date value can be referenced.

    iconNote:
    When the date widget has a default value, the set start date does not take effect. You must re-select the date.

    End Date

    End date of the selectable date range for the widget, namely the latest date that can be selected

    After End Date is set, data outside the range is grayed out and cannot be selected. The supported types are the same as those of Start Date.

    Watermark

    Light gray watermark text displayed in the widget during data entry

    It is manually entered to prompt users for the required information. 

    It disappears when the widget editing area is clicked.

    The default is empty.

    Return Value Type

    Format of the returned value after selection

    There are two types (Date and String), which should match the type of the date field in the database table.

    Date: The return value is a date.

    String: The return value is a string.

    Validate

    Allow Null

    Whether to allow empty for the widget

    When it is ticked, the widget allows no selection.

    When it is unticked, a prompt appears during data entry verification and submission.

    The default is being ticked.

    Error Tip

    A setting item appearing when Allow Null is not ticked, which allows customizing the prompt message.

    The default is empty.

    Allow Edit

    Whether to allow entering values directly

    When it is ticked, you can enter values directly.

    The default is being ticked.

    iconNote:
    The function is not supported on mobile terminals.

    Widget in Parameter Panel

    After adding the Date widget, you can set the attributes of the date widget in the bottom right corner.

     

    The detailed introduction of each attribute setting item is as follows.

    iconNote:
    When assigning values to the Date widget, such as default value, start date, and end date, you are advised to use the date format yyyy-MM-dd for accurate recognition.

    Classification

    Settings

    Introduction

    Basic

    Widget Name

    Name of the widget

    It is manually entered, usually used in conjunction with parameters (such as getting the widget value through the widget name and passing the value to the corresponding parameter).

    The default is dateEditor0.

    Enabled

    Whether the widget is enabled

    When it is ticked, the widget can be edited during data entry.

    When it is unticked, the widget is grayed out and cannot be edited during data entry.

    The default is being ticked.

    Visible

    Whether the widget is visible

    When it is ticked, the widget is displayed on the page during data entry.

    When it is unticked, the widget is not displayed on the page during data entry.

    The default is being ticked.

    Advanced

    Label Name

    The label attribute of the widget is used in mobile terminals. Because mobile terminals do not support Label Widget on the parameter panel, they can recognize the Label Name attribute of ordinary widgets and use label names of the widgets.

    Widget Value

    Default value of the widget at initialization

    It supports Date, Formula, and Field.

    The default is the current date.

    1. Date: date type, allow selecting a date.

     

    2. Formula: formula supported by the designer, for example, enter A1 here because A1 cell is a date value.

     

    You can set the default value of the date widget to be empty by entering an empty string   ('').

     

    3. Field: dataset field (dataset includes template dataset and server dataset), such as the time field of dataset ds1

    Format

    The supported input formats for the date widget are Date and Time.

    The default is Date.

    You can modify the date format to transform the display style of the date widget. For example, modify the format to yyyy-MM to display the widget in a year-month style.

    iconNote:
    FineReport 11.0.5 and later versions allow displaying a year widget by setting the format to yyyy.

     

    You can select a format from the drop-down menu or directly enter a format. When the entered format is not supported, the sample box will display a red warning message as shown in the following figure.

     

    Date: allows defining the query date format within the range of year, month, and day.

     

    Time: allows defining the query date format within the range of year, month, day, hour, minute, and second.

    Start Date

    Start date of the selectable date range for the widget, namely the earliest date that can be selected

    After Start Date is set, data outside the range is grayed out and cannot be selected.

    There are three types (default to None):

    1. None: no limitation

    2. Date: allows selecting a specific date.

    3. Formula: allows directly entering the formula. For example, if cell A1 is a date value, enter A1 in Formula, and the date value can be referenced.

    End Date

    End date of the selectable date range for the widget, namely the latest date that can be selected

    After End Date is set, data outside the range is grayed out and cannot be selected. The supported types are the same as those of Start Date.

    Watermark

    Light gray watermark text displayed in the widget during data entry

    It is manually entered to prompt users for the required information. 

    It disappears when the widget editing area is clicked.

    The default is empty.

    Font Size

    Font size of the selected date displayed in the widget box

    The default is 12.

    iconNote:

    1. The font size of the date text in the drop-down options does not change with the font size here.

    2. The function is not supported on mobile terminals.

    Return Value Type

    Format of the returned value after selection

    There are two types: Date and String.

    Date: The return value is a date, related to the database field.

    String: The return value is a string, related to the database field.

    Validate

    Allow Null

    Whether to allow empty for the widget

    When it is ticked, the widget allows no selection.

    When it is unticked, a prompt appears during data entry verification and submission.

    The default is being ticked.

    Error Tip

    A setting item appearing when Allow Null is not ticked, which allows customizing the prompt message

    The default is empty.

    Allow Edit

    Whether to allow entering values directly

    When it is ticked, you can enter values directly.

    The default is being ticked.

    iconNote:
    The function is not supported on mobile terminals.

    Coords & Size

    Widget Location

    Location of the widget in the parameter panel

    The location is displayed automatically as horizontal and vertical coordinates which can be adjusted here.

    Widget Size

    Size of the widget

    It can be adjusted by changing width and height. If the size is adjusted by dragging, the height and width will be automatically adjusted accordingly.

    Event

    In the event setting interface, you can add events to the widget to achieve certain effects. The Date widget supports events such as After Initialization, After Editing, and After Exiting Edit.

     

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

     

    You can select the corresponding event response method to add.

    Mobile Terminal

    No configurable options in Mobile Terminal

    Application Examples

    The applications of the date widget are shown in the following table.

    Application Scenarios

    Effect

    Scenarios:

    Select the year and month in the date widget, and you can query the number of days and weeks in that month.

    Scenarios:

    By using the date widget, query data of the date that is a specified number of days before or after a certain date.

    Scenarios:

    There is a time field in a table in the database, and almost every minute and second there is a new piece of data generated. 

    To reduce the amount of data displayed in the report, you can filter the data by time interval to display part of the data.

    Scenarios:

    When you add a date widget in a report, the current date is displayed by default. You can change the default display of the date as needed.

     

    Attachment List


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

    Doc Feedback