Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

14.02 Creating Maps

Creating Maps

Adding a map to your report is a pretty simple process and it only involves three steps: setting the data fields, choosing the map type, and assigning the map title. Let’s start out by examining the Map Expert and how to use it. To add a map to the report, choose the menu options Insert > Map. Alternatively, you can click the Insert Map button shown in Figure 14-2.



Figure 14-2. Insert Map button.

This opens the Map Expert dialog box, which has three tabs: Data, Type and Text. The Data tab lets you set where to place the map, choose the map layout, and select the data fields. The Data tab is shown in Figure 14-3.



Figure 14-3. The Data tab of the Map Expert.

The top section, Placement, determines where to place the map on your report. You can either place it in the Report Header or the Report Footer. If your report has groups defined, then you can also choose to put it in either the header or footer of one of the groups. Maps are similar to charts in that they can’t be placed in the Details section.

The Data section of the dialog box is where you set the fields for mapping. There are three areas to enter fields. The Geographic Field is the field that has the location information in it. This can be a country, state or city. The On Change Of field determines at what point to plot the data. In most cases, this is the same as the Geographical Field. In fact, when you assign a field to the Geographic Field, Crystal Reports automatically assigns the same field to the On Change Of field (which you can override if necessary). The last section, Map Values, is where you place the summary field which gets plotted on the map. The default summary function is Sum() which you can change by clicking the Set Summary Operation button below it.

The buttons in the Layout section work the same as the layout buttons in the charting chapter. Each button is enabled depending upon the type of report being used. If it is a basic report, then the Advanced button is enabled. If the report has groups and at least one summary value, then the Group button is enabled. If it is a cross-tab object then the Cross-Tab button is enabled. The OLAP button is enabled when mapping on an OLAP grid.