Dynamic calendar report

  • Last update:  2021-05-12
  • I. Overview

    1. Application scenarios

    Realize the calendar of each month, and you can switch between the previous and next months by clicking.

    1.gif


    2. Realization idea

    1) Get the first day of the week where the first day of the current month is located, get the last day of the week where the last day of the current month is located, and use the range() formula to generate all dates between these two dates.

    2) Realize month switching through dynamic parameters.

    II. Example

    1. Design report

    1) The report style is designed as follows:

    A1 customize parent cell to A2.

    Fill in cell A2 with the formula: [1,2,3,4,5,6,0]

    Note: Some systems use the dateinweek() function to get the first day of Sunday. At this time, just change the formula of cell A2 to [0,1,2,3,4,5,6].

    Fill in cell A3 with the formula: GREPARRAY(range(dateinweek(dateinmonth($rq, 1), 1), dateinweek(dateinmonth($rq, -1), -1)), weekday(item) = A2)

    Cell A2 is set to expand horizontally, and cell A3 is set to expand vertically.

    2.png

    2) Set three conditional formatting in cell A1:

    When A2=4, the new value is the formula type: left($rq,7)

    3.png

    When A2=1, the new value is the string <, use the Hyperlink> Dynamic Parameters, the parameter is rq, and the value is the formula type: monthdelta($rq,-1)

    4.png

    When A2=0, the new value is string>, use Hyperlink>Dynamic Parameters, the parameter is rq, and the value is the formula type: monthdelta($rq,1)

    5.png

    3) Set Display>Data Dictionary>Custom in A2.

    6.png

    4) Set Display>Formula Form in A3, the formula is: day($$$)

    7.png

    5) Set two Conditional Formatting> Color in cell A3.

    When the date is a weekend, the font is red.

    8.png

    When the date does not belong to the current month, the font is gray.

    9.png

    6) Set Template> Template Parameters.

    The parameter name is rq and the value is the formula: today()

    10.png


    2. Effect preview

    Save the template, click Pagination Preview, the effect is as I.1 above.

    Note: Mobile terminal is supported.

    III. Download template

    Refer to completed template: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\Dynamic_calendar.cpt

    Click to download: 

    Dynamic_calendar.cpt


    Attachment List


    Theme: Report Application
    • Helpful
    • Not helpful
    • Only read

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

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

    不再提示

    10s後關閉

    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