Overview
Application scenarios: If you have installed the FVS plugin, you can view this article to learn about functions related to FVS templates.
Note: Mobile devices are not supported.
Version
Report Server Version | Plugin Version | Function Changes |
11.0.6 | 1.8.0 | Visible on preview setting was cancelled. You can hide or display components in Widget Layer list. |
11.0.6 | 1.5.0 | Added DateTime Widget. |
Function Introduction
During template preview, you can select date and time, and other components will be linked through parameters. As is shown below:
For component animation, see FVS Component Animation.
For component styles, see FVS Component Basic Attributes. If you want to modify the widget name, set it on the Content tab page.
Functions
Widget Content
What can be set in the date time widget is shown as follows:
For details, see the table below:
Settings | Details |
Name | The widget name is the parameter name, and it is set as English by default. The name needs modifying according to the actual parameter. |
Font Size | The font size of the text in the widget defaults to 12 px |
Format | There are four types of date and time formats. Each type supports multiple display styles. You can also input date and time manually. |
Default Value | There are three types of default values you can choose to set date and time. 1. Custom Date Time: By default, it takes the current date and time, and the displayed value is consistent with the format type above. It can be deleted and re-selected, and also supports manual input.
2. Field: You can select field in the dataset. If the return value is an array, only the first value in the array will be displayed.
3. Formula: Click fx on the right side to enter the formula. If the return value is an array, only the first value in the array will be displayed |
Return | The format of the return value is divided into two types: Date and String, and generally need matching the type of the date field in the database. |
Watermark | The light gray watermark text displayed inside the widget during preview will remind you what to input. It will disappear by default after clicking the widget to enter text. The widget content is empty by default. |
Date Range | You can set the start date and end date. The start date must be earlier than the end date. After setting the date range, data outside the range will become gray and cannot be selected. There are three types of settings: 1. No Limit 2. Custom: By default, it takes the current date and time, and the displayed value is consistent with the format type above. It can be deleted and re-selected 3. Formula: Click fx on the right side to enter the formula. If the return value is an array, only the first value in the array will be displayed |
Permission | It is used to decide whether the widget is editable when previewing. The default option is editable. |
Validation | Allow null: It will be ticked by default. If ticked, the widget is allowed to be null. If not ticked, you can set calibrate prompt text. And if the widget is empty during template preview, the prompt text will be displayed. |
Widget Interaction Events
Click Interaction > Add Event to add JavaScript events for more effects. The date time widget supports After Initialization and Edit Finish events. As is shown below:
The JavaScript event settings box will pop up if you click a specific event. As is shown below:
Note: For JavaScript supported by FVS, see JS Interface Scenarios Supported by FVS Large Screen.
Examples
Preparing the Template
1. Click File > New FVS Report in the top left corner of the designer.
2. Create a database query ds1 and enter the following SQL query statement:
SELECT * FROM ORDERS where 1=1
${if(len(starttime)=0,""," and SIGNDATE>='"+starttime+"'")}
${if(len(endtime)=0,""," and SHIPDATE<='"+endtime+"'")}
Then you can retrieve the data from the order data table where the order date is within the range of starttime and endtime.
As is shown below:
Adding Title Component
Click Text > Title and add it to the page. In the right configuration panel, set the title content to Start Time, then copy another title and set the content to End Time. As is shown below:
Adding DateTime Widget
Click Widget > DateTime and add it to the page.
In the configuration panel on the right, set the widget name to starttime to match dataset parameter starttime. The default value of custom date time is 2011-05-22.
Copy another DateTime widget, name it endtime, and match it with dataset parameter endtime. The default value of custom date time is 2011-06-22.
As is shown below:
Adding Line Chart Component
1. Click Chart > Line Chart, add it to the page, and add data to the line chart as shown in the figure below:
2. Select the line chart, click Content > Style > Axis, and set the type of X Axis to Time Axis.
Previewing the Effect
Click Save in the upper right corner and click Preview. If you modify the start or end time, the line chart will display the corresponding data within the time range. As is shown in section “Function Introduction”.