Successfully!

Error!

Using template parameters to dynamically display area map in Dashbaord

  • Last update:  2021-03-18
  • I. Overview

    1. Problem description

    The effect of using parameters to dynamically display map area in decision report is shown in the following figure:

    1.gif


    2. Implementation ideas

    By setting dynamic parameter type hyperlinks in the report block, the map can display the corresponding regional data by clicking the provinces in the report block.


    II. Example

    1. Data preparation

    1) New dashboard, new data set DS1, database query statement: select distinct pid from MapEN limit 10.

    2) Create a new data set DS2, and the database query statement is: select * from MapEN where pid = '${area}'.

    截屏2021-03-18 下午7.25.27.png


    2. Report design

    1) Drag the report block and map to the main body of dashboard, and the left edge of the map is adjacent to cell A1 of the report block.

    2) Edit the report block, drag the field pid of data set DS1 into cell A1, add a hyperlink of dynamic parameter to cell A1, set the parameter as area and the value as formula $$$.

    3) Edit the map as shown in the figure below.

    4) Add a template parameter to the report and name it MapBoarder. The default value is the formula "geographic/World/China/" + $area.

    Note: the paths in the default values are different in 8.0, 9.0 and 10.0. In the example, the paths are 10.0. Other versions need to go to the FineReport installation path to view and modify.

    5) Finally, modify the map boarder as shown in the figure below

    截屏2021-03-18 下午8.07.25.png


    3. Effect preview

    Save the report and click dashboard preview it. The effect is as shown in the I.1 problem description.

    Note: in addition to displaying the city data under the province in the example, it can also be configured to display the district data under the city, and even after customizing the map, the template parameters can be transferred to the user-defined map to realize rich linkage charts.


    III. Template download

    Completed template, please refer to %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Dashboard\Dashboard_AreaMap_with_dynamicPara.frm

    Click download template: Dashboard_AreaMap_with_dynamicPara.frm


    Attachment List


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

    Doc Feedback