Design a map using a marker rule in Bold Reports®

You can design a map in the Bold Reports® Web Report Designer with a marker rule and color rule. The example map displays the mineral resources production plants of a company in the USA.

How do I create the data set?

You create the data set for the map in the Bold Reports® Web Report Designer from a JSON file. Follow these steps:

  1. In the data panel, click New Data. New data
  2. Choose the JSON connection type. JSON connection
  3. Choose File as Type. Choose source type
  4. Click the upload button, then browse and upload the JSON file in the File Path field. Provide connection details
  5. Click the Connect button.
  6. In the query builder, the available fields in the JSON file are loaded under the default table name, Result. Enter query
  7. Drag and drop the Result table and execute. Execute table
  8. Modify the data set Name and click Finish. Data list

Note: This data is created for demonstration purposes. Download the mineral resources sample JSON file.

How do I add a map to the report design?

The Map report item in the Bold Reports® Web Report Designer is listed under the Data Regions category in the item panel.

Map listed in item panel

To add a Map report item to the report, drag the map from the item panel into the design area.

Drag map into design surface

The map item is rendered in the design area, and the map properties are listed in the properties panel.

Basic map rendering

By default, map report item renders with world map shapes.

How do I bind analytical and shape data?

You bind analytical and shape data in the Bold Reports® Web Report Designer from the Basic Settings category of the properties panel. Follow these steps:

  1. Under the Basic Settings category, set USA in the Shapes property and choose the data set in the DataSet property.

    Basic map rendering

  2. Click the edit icon for the Binding Data property under Basic Settings. Edit icon

  3. Match the analytical and shape data as described in Binding Data. Choose name in the Field Name drop-down and choose the =Fields!Country.Value expression in Binding Expression. Edit icon

  4. Click Update.

How do I customize the map appearance?

You customize the map title, color settings, and other properties in the Bold Reports® Web Report Designer properties panel.

Appearance

Under the Appearance category in the Bold Reports® Web Report Designer, set the border width and color properties as required.

Edit icon

Title

Under the Title category in the Bold Reports® Web Report Designer, set the title text, position, and font properties for the map title. First, enable the Enable Title check box. Then, set the title as = "Mineral Production Plants of " & Fields!CompanyName.Value and the position as center. Title text

Shape settings

Under the Shape Settings in the Bold Reports® Web Report Designer, set the following values:

  • Background color as #ffffff.
  • Border color as #676767 and width as 0.672px.
  • Tooltip as =Fields!State.Value.

Shape settings

How do I define the marker rule?

You define the marker rule in the Bold Reports® Web Report Designer after you enable the markers. Under the Marker Settings category, enable the Enable Marker checkbox. Set the marker size as 12.333 and the tooltip as the =Fields!Resource.Value expression, and leave the other values at their defaults. Marker settings

Marker rule

Under the Marker rule category in the Bold Reports® Web Report Designer, enable the Enable Marker Rule check box. Then, set the following values:

  • Choose the Resource field in Data Value.
  • Define custom marker styles as described in Marker property. Here, seven styles in total are defined to show the data on the map surface.Marker settings
  • Set Bucket Count as seven.

The marker rule configuration looks like the following image.

Marker rule

Marker color rule

The marker color rule in the Bold Reports® Web Report Designer differentiates items that share the same marker style. The marker style configuration above defines seven marker styles, and Diamond is defined more than once. So, in preview, two items denote the Diamond shape. To differentiate these items, apply a marker color rule.

Under the Marker color rule category, enable the Enable Color Rule check box. Then, set the following values:

  • Choose Resource in Data Value.
  • Choose Type as Color Palette.
  • Choose Palette as Random.
  • Choose Optimal for Distribution type.
  • Set Bucket Count as seven.

The marker color rule configuration looks like the following image.

Marker color rule

The markers are now applied to the map shapes, but with sample data.

Initial design

To see the actual data on the map surface, preview the report. Before that, resize the width and height of the map so you can view the information clearly in preview.

Final design

Preview report

You can preview the report at design time using the built-in Bold Reports® Viewer to make sure the report design is as expected. In preview mode, you can see the different mineral resources production plants located in states of the USA. The following snapshot shows the marker style distributed based on the type of mineral resource plant.

Report preview

Download the marker rule map report design (RDL).

See also