Binding Data to a Map Embedded in a Report

Data Binding for a Map element is substantially different than for other elements, and will be discussed in the following example.

Note: Map data is stored and loaded via an HSQL database (an open source Java RDBMS). It comes installed with the product and runs within the same JVM as the Report Designer. The location of the HSQL DB files is “{InetSoftInstallationRoot}/lib/map/hsqldb”. The location can be specified by the “map.shp.dir” property which is loaded from the sree.properties file.

Register for Pricing
Request a Demo
#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index Read More

Walkthrough: Inserting a Map in a Report

In the following example you will create a Map which displays customer dispersion across the United States.

  1. Open the Designer and click the ‘New’ button. In the ‘Create Report’ dialog box, select ‘Blank Tabular Report’ and click ‘OK’.
  2. Click the ‘Map’ button to add a Map element to the report.

Note: Since mapping data has to be loaded, there may be a delay before the map is rendered.

  1. Select the Map element, right-click on it, and select ‘Bind Data’ from the context menu. This opens the ‘Data Binding’ dialog box.
  2. In the Data tab, select the ‘customers’ query under the ‘Orders’ data source.
  3. In the Columns tab, select the following columns: ‘state’ ‘city’ ‘customer_id’
  4. Click the Map Data tab. Drag the ‘state’ and ‘city’ columns (the columns which contain geographical information) to the ‘Geography Columns’ panel.
  5. In the ‘Geography Columns’ panel, click to select the appropriate geographical layer form the drop-down menu. ‘state’ -> State ‘city’ -> City
  6. Specify the remaining geographical information. (Because the data set does not contain nation or continent information, we have to specify these in the data binding.)
    1. Click the ‘+’ button in the ‘Map Binding Parameters’ panel. This adds the ‘Continent’ layer. Set ‘Continent’ to ‘North America’.
    2. Click the ‘+’ button again. This adds the ‘Nation’ layer. Set ‘Nation’ to ‘United States’ (at the top of the list).
  7. Specify ‘customer_id’ as the ‘Aggregate Column’, and set ‘Distinct Count’ as the ‘Formula’.
  8. Resolve the feature names. (This ensures that the geographic naming convention used in the data matches the standard naming convention followed by the map database.)
    1. Click the Feature Names tab. The mapping engine will attempt to resolve the geographic names of the States and the Cities. The icons at the top-left of the dialog box indicate the result of the resolution process.
    2. If a geographical layer cannot be automatically resolved, manually specify the appropriate location mapping. See Unresolved Geographic Feature Names below.
  9. Click on the ‘Finish’ button to complete the data binding.
view gallery
View live interactive examples in InetSoft's dashboard and visualization gallery.

Unresolved Geographic Feature Names

In the event that a geographical layer cannot be automatically resolved, you can manually resolve them. For example, if our data contained the state nicknames instead of the actual name or symbol, e.g., “Garden State” for “New Jersey,” “Empire State” for “New York,” etc., we would need to map those nicknames to the actual geographical names by using the following procedure.

  1. When resolving such data in the Feature Names tab, the unresolved names would show up under the ‘Source Data’ list. On clicking on an unresolved name, the suggested mapping(s) (on an alphabetical basis) would appear under the ‘Map Feature’ list.
  2. If the desired mapping exists, we may select it and add it to the ‘Matched Values’ list using the ‘Add’ button.
  3. If the desired mapping name does not exist, then we can explicitly select it using the ‘Show All’ button. Manual mappings are stored in .properties files. At run time these files will be loaded from a location specified by the ‘map.mapping.directory’ property located in the sree.properties file.
  4. The manual mappings can be saved for future usage by clicking on the ‘Save’ button. Once saved, it can be retrieved during the data binding of another Map element using the ‘Load’ button.
Read what InetSoft customers and partners have said about their selection of Style Report as their production reporting tool.

Map Preview and Interaction (Setting the Default View)

To set the default view for a map, follow these steps:

  1. Preview the report.
  2. Click the map to display the map toolbar.
  3. Use the toolbar controls to pan, zoom, and set layer visibility. (See the table below for a description of the controls.)

The map view that you configure using these controls will be the default map view for the end user.

Previous: Binding Data to a Report Section