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. New sub-template
1) Data preparation
Create a New General Report, Renamed to: mapson.cpt,create a new dataset 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 designAdd template parameters
Click Template>Template Parameteron the menu bar of the designer, and add a new template parameter MapBoundary whose value is 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.
Set the map boundary
Select the map and set the map boundary as the Template Parameters-MapBoundary, as shown in the figure below:
2. Add hyperlink to parent template
1) Open the built-in template of the designer:%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Advanced\Chart\NewMap\map.cpt, As the parent template.
2) Parent templateSpecial Effects>Interactive AttributesNext, add a hyperlink of the network report type, link to the sub-template, and set the transfer parameter to area, whose value is the area name, as shown in the following figure:
3. Effect preview
Save the template, select the template mapFather.cpt, click Pagination Rreview, the effect is as shown in the figure below:
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: