Skip to main content Skip to footer

ActiveReports8 : Working with Maps

Expect More! Get More! ActiveReports 8 was landed to take this belief forward and hence is THE BIG thing these days. It's not just a Reporting Tool, but offers you an option to scale-up to own a Report Management System as well (ARS). You may use ActiveReports 8 Reporting Tool to create reports and manage these reports using the ActiveReports 8 Server. Not that you cannot create reports on the server itself. For this, ActiveReports has more to offer, the Ad-Hoc Designer. Along with the above-mentioned points, many new features have been added in ActiveReports 8 and has already been discussed in one of my earlier blogs. In this blog, we will discuss about one of it's most important new feature : MAPS Going by the definition, Maps are the Graphical Representation of large volume of data against geographical background. In ActiveReports, the Map data region is a Professional Edition feature and, as of now, is available with Page Reports only. A Map contains a title, a viewport that specifies the center point and scale, one or more layers that display spatial data, and a variety of legends and color scale that help users interpret the data visualizations. The following illustration shows the basic parts of a map. maps You may refer to the documentation to understand how maps can be added in the report and bound to the data thereafter. Let's get started and see how can we show the most populated countries of the world on a Map control. Following are the prerequisites :

  1. A machine with AR8 installed on it ;-)
  2. A 'World Shape File'
  3. A database with a list of countries and their respective population

Once we are through with the above mentioned check-list, we need to perform the following steps :

  1. Open the ReportDesigner and create a new PageReport
  2. Bind the report to the respective DataTable by setting it's DataSource property
  3. Create the a DataSet and set the query as : Select Top 5 * From Table1 Order By Table1.Population desc
  4. Drag and drop a Map control on the Report
  5. Select the Map template as 'From ESRI File' and load the World Shape File
  6. Select the Polygon Layer from the Layers Pane, right click and select the Layer Data option
  7. Select the Analytical data option present in the Left pane of the Dialog that pops-up
  8. Select the respective dataset from the Dataset dropdown list and click the Add (+) button located next to the Match field
  9. In the Spatial field select the NAME option from the drop-down and in Analytical field select the '=Fields.Item("Country Name").Value' option from the drop-down
  10. Press Ok and Click the Preview tab to see the Report

Please note, a Match Field is used to build a relationship between the analytical data and the spatial data. Hence, you need to make sure that the Spatial field and Analytical field options are set to data fields that contain same data in both Spatial and Analytical databases. Following is how your report with look like : Screenshot from 2014-07-02 13:43:23

MESCIUS inc.

comments powered by Disqus