Scheduled Task Example- Daily Report

  • Last update:October 21, 2024
  • 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

    iconNote:
    The daily report is created using the data at a specific time on 06/01/2011. This section uses data between 06/01/2011 00:00:00 and 06/01/2011 23:59:59 as an example to generate the daily report.
    Template Preparation

    Open the template in the %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Advanced\BetweenCellOperation\Reference_Previous_Row.cpt path.

    Parameter Setting

    1. 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.

    2024-10-21_16-51-35.png

    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. 

    iconNote:
    The widget values will be generated automatically after you set the starttime widget and endtime widget as text widgets.

    2024-10-21_16-52-20.png

    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.

    2024-10-21_16-56-57.png

    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.

    2024-10-10_11-36-05.png

    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.

    2024-10-21_17-39-39.png

    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.

    2024-10-21_17-41-59.png

    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.

    2024-10-21_17-44-14.png

    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.

    2024-10-21_17-51-15.png

    Effect Display

    Log in to the decision-making system as Anna (who belongs to the technical support department), as shown in the following figure.

    iconNote:
    The password for FineReport built-in users is 123456.

    2024-10-21_18-17-57.png

    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.

    Attachment List


    Theme: Decision-making Platform
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    9s后關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy