JReport provides geographic visualization and analysis by overlaying customized areas and markers onto interactive maps in Google Maps, OpenStreetMap and OpenCycleMap. JReport also supports Google Maps JavaScript API Version 3. Three types of maps can be displayed in JReport: Roadmap, Satellite, and Terrain. Conditional properties such as shape, size, color and label can be adjusted to provide an understanding of the data at a quick glance. Geo Analysis extends traditional data analysis on static maps, where zooming and panning are common, to more dynamic methods of interacting with geographic data. Analyze data using a familiar map interface and drill down hierarchies containing countries, states, counties and cities. This works in Page Report Studio, Web Report Studio as well as JDashboard.

How to create a map for my report?

We will insert a geographic map in a web report as an example to show the basic procedure:

  1. Drag the Geographic Map button   from the Visual category of the Components pane to the blank area in the web report.
  2. The Create Geographic Map wizard appears. In the Data screen of the wizard, select a business view in the current catalog on which the geographic map will be created. Then click Next.
  3. In the Display screen, add the group objects Region and then Country from the Resources box to the Drill Path box as the grouping criteria. Use the right arrow  to add them one by one.
  4. Click Finish to insert the geographic map.

Create a Map

How to create a map with dynamic tips (controlled by formula)?

We will create a geographic map in a library component and use three formulas to show advanced customization of the map.

  • MarkerTipforCountry

“Country:” + ” ” + @”Customers.Country” + “\n” +
“Total Cost:” + ” ” + ToText(@”Orders Detail.Total Cost”,”$#,###.00″) + “\n” +
“Total Sales:” + ” ” + ToText(@”Orders Detail.Total Sales”,”$#,###.00″)

  • AreaTipforState

“Country:” + ” ” + @”Customers.Country” + “\n” +
“State:” + ” ” + @”Customers.State” + “\n” +
“Total Sales:” + ” ” + ToText(@”Orders Detail.Total Sales”,”$#,###.00″)

  • LocationInfoforState

@”Customers.State” + “,” + @”Customers.Country”

Geo Analysis

How to perform interactions on a map?

After the library component created above is published to JReport Server, we can then add it to a dashboard to perform geo analysis on the map.

Geo Analysis