Overview
Version
Report Server Version |
---|
11.0 |
Application Scenario
You may want FineReport to generate data of a certain time period (for example, from 00:00:00 to 23:59:59 of the previous day) everyday and save such data in formats such as PDF, Word, CPT, and XLS to the corresponding directories. This can be achieved by task schedule configuration.
Function Description
You can set scheduled tasks in the decision-making system to display the daily report results to other users on a timed basis each day.
Example
Template Design

Open the template in the %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Advanced\BetweenCellOperation\Reference_Previous_Row.cpt path.
Parameter Setting1. Choose Template > Template Parameter. Add the parameters starttime and endtime. Select Formula from the drop-down box of Default Value to represent the time between the midnight (00:00:00) to the end of the day (23:59:59) of the previous day. Enter Format("2010-06-01","yyyy-MM-dd 00:00:00") in the Default Value text box for starttime, and Format("2010-06-01","yyyy-MM-dd 23:59:59") in the Default Value text box for endtime, as shown in the following figure.
2. Go to the parameter panel, add the template parameters to the panel, and set the starttime widget and endtime widget as text widgets, as shown in the following figure.

Filter Setting
Exit the parameter panel, double-click cell A3, select Filter, set Available Column to Date and Operator to Greater than/Equal to, and select $starttime from the drop-down box. Similarly, set Available Column to Date and Operator to Less than/Equal to, and select $endtime from the drop-down box, as shown in the following figure.
Scheduled Task
Task Adding
For details about how to add a scheduled task, see Task Adding.
Basic Setting
Set Task Name to Daily_Report, click Edit next to Default User Group, select Technical support from the drop-down box of Dept., and click OK, as shown in the following figure.
Schedule Object
Click Next, select the Reference_Previous_Row.cpt (template modified in section "Template Design") from the drop-down box of Template, and click Set Default Parameter Value next to Parameter Setting to display template parameters automatically. Set File Name to Daily Report of ${today()}, and select excel03, excel07, word, and pdf next to Appendix Archive, as shown in the following figure.
Schedule Cycle
Click Next. Set Frequency to Detailed Frequency Setting and click Add. Set Execution Time to 18:00, set Execution Date to Every Day, and select Select All from the drop-down box of Execution Month. Set the frequency for Task Restart, as shown in the following figure.
File Processing
Click Next, select Mounting Platform, click Mounting Platform, select Report from the drop-down box of Mounting Directory, set Mounting Name to Daily Report, and click Save, as shown in the following figure.
Permission Assignment
Choose System Management > Permission Management, select Technical support, and assign the viewing permission on the Report directory to the whole technical support department, as shown in the following figure.
Effect Display
Log in to the decision-making system as Anna (who belongs to the technical support department), as shown in the following figure.

Template Download
For details about the completed template, go to %FR_HOME%\webroot\WEB-INF\reportlets\doc-EN\Advanced\BetweenCellOperation\Daily_ Report.cpt.
You can download the template:Daily_Report.cpt.