I. Overview
1. Problem description
The parent template displays the national map, and the child template dynamically displays the province map corresponding to the region according to the regional parameters passed by the parent template. Results as shown below:
2. Solutions
Through Special Effect>Interaction>Hyperlink, the map area can be displayed dynamically.
II. Example
1. Data preparation
Create a New Normal Report, create a new data set ds1, the database query statement is: select * from MapEN where pid = '${area}'. As shown below:
2. Insert chart
Merge a piece of area cells, right-click cell A1, select Cell Element>Insert Chart>Map>Area Map, as shown in the figure below:
3. Data binding
Bind the chart data, as shown in the following figure:
4. Style design
1) Add template parameters
Open the template mapSon.cpt and add the template parameter: MapBoundary, the parameter value uses the formula: "geographic/world/China/"+$area, as shown in the figure below:
Note: The area parameter is the parameter passed by the hyperlink in the parent template to the child template.
2) Set the map boundarySelect the map and set the map boundary as the Template Parameters-MapBoundary, as shown in the figure below:
5. Special effects design
1)Open the template%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Advanced\Chart\NewMap\map.cpt,select cell A1, select cell element, select Special Effect>Interaction>Hyperlink, select Hyperlink-Web Report, select the newly created mapSon.cpt, add the parameter area, and select the AREA_NAME for the parameter value, as shown in the figure below:
6. Effect preview
1) PC
Save the template, select the template mapFather.cpt, click Pagination Rreview, the effect is as shown in the figure below:
2) Mobile
III. Template download
The completed template can be found in:
%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Primary\Chart\mapFather.cpt
%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Primary\Chart\mapSon.cpt
Click to download the template: