BackPrevious Topic Next TopicNext

Shape Maps

A shape map is a special kind of image in Logi Report that contains a picture and certain areas that are bound with groups in a banded object.

The Shape Map feature is supported only in page reports created using query resources and works when the page reports run in the HTML format or in Page Report Studio.

This topic includes the following sections:

See an example: The SampleComponents catalog, included with Logi Report Designer, contains reports that have examples of how each component type could be used in a report. For the shape map component example, open <install_root>\Demo\Reports\SampleComponents\MapReport.cls.

Creating Shape Maps in a Page Report

  1. Select a tabular cell, or the banded header/footer, group header/footer, or banded page header/footer of a banded object in the page report.
  2. Do any of the following:
    • Drag the Insert Shape Map button Insert Shape Map button from the Components panel to the destination.
    • Select Insert > Map > Shape Map.
    • Select Home > Insert > Map > Shape Map.

    The Shape Map Editor appears.

    Shape Map Editor window

  3. To use an image as background of the map, select Menu > Insert > BackgroundImage. In the Shape Map Background Image dialog, select Choose button to specify the image and select OK.
  4. Next is to add areas to the map. You can do this either by importing from an previously saved XML file or an ESRI file which has been defined with some area information, or by drawing the areas manually, or using a combination of these two.
    • To import the predefined map areas, select Menu > File > Open, then in the Import Shape Map Area dialog, specify the .xml file or .shp file that contains the required area information and select Open to import the areas.

      If you choose to import the map areas from a .shp file, the Select Area Name dialog appears, prompting you to further specify the field in the ESRI shape file using which to define the area names and the fields from which to get the area tooltip. The tooltip will be displayed when you hover the mouse over the areas when the report runs in HTML format or in Page Report Studio.

      Select Area Name dialog

      To define the tooltip of the map areas:

      1. Select a field from the field box the values of which you want to display in the tooltip and select Add button. Repeat this to add more fields.

        To remove a field from the tooltip, select it in the Tips box and select Remove button.

      2. Adjust the order of the added fields in the Tips box by selecting a field and making use of Move Up button and Move Down button. The order of the fields determines the display sequence of their values in the tooltip. (for more information, see Select Area Name dialog).

      Note: The area tooltip can be displayed only when Alternate Content Type on the map object is set to customized.

    • To draw the areas manually, select Insert Mode on the toolbar, or Menu > Edit > Insert Mode to switch the Shape Map Editor to the mode.

      To draw an area, select the left mouse button to pick the start point of the area. Move the mouse pointer and select the left mouse button to select the other points. The points will be connected automatically. When you move the mouse pointer to the start point, a square appears indicating that the area will be closed. Select the left mouse button to finish drawing the area. If you want to undo your last line, select the right mouse button.

      Draw an Area

  5. If you want to further change the shape or position of the areas, select Insert Mode on the toolbar again to switch the Shape Map Editor to edit mode.

    To change the shape of an area, move the mouse pointer over the border or the points of the area. When it becomes a cross, choose a point on the line and drag it to create a new point. You can also choose a point of the area and drag it to a new position. If there are three points on one line, the middle point will be deleted automatically.

    To move an area, move the mouse pointer close its border. When it changes to a four-headed arrow, drag the area to a new position.

    Tip: If you have specified a background image for the map, and the size of it is not the same as that of the map object, you can select Menu > Insert > Match Background Image in the Shape Map Editor to resize the map object so as to make it match the size of the background image.

  6. Bind data to the map areas so as to show values on the areas.
  7. Add conditional formats to the map areas.
  8. You can make the map areas linked to different targets (to add a link to a map area, right-click it and select Link from the shortcut menu).
  9. In the Map Area Inspector panel, you can edit properties of any area, label, summary and line in the map. For labels and summaries, you can also edit their background color, foreground color and font properties by using the corresponding buttons on the Shape Map Editor toolbar.

    For areas, labels and summary fields, you can specify the properties globally and apply the global settings to individual ones conveniently. To specify area, label or summary field properties globally, select the corresponding sub node under the Map Global Setting node in the Map Area Inspector tree, then edit the property values accordingly.

    To make a specific area, label or summary field adopt the global settings, select it in the inspector tree, then set its Use Global Setting property to true. If you want the global settings to be applied to all the areas, labels or summary fields at a time, select Menu > Edit > Reset All, then in the Reset All dialog, specify the properties according to your requirements.

  10. If you want to save the area information you have defined in a file for future use, select Menu > File > Save As in the Shape Map Editor. In the Save Map Area dialog, specify the directory where you want to save the file and a name for it, then select Save. Later when you create a report with a map, you can choose to import areas from the saved XML file.
  11. Select Save to save the changes to the map and close the Shape Map Editor.
  12. Select the mouse button in the tabular cell, or banded panel to insert the map.

The shape map is now inserted in the specified destination. You can further edit it using the Shape Map Editor. To display the editor again, right-click the shape map and select Format Shape Map on the shortcut menu.

Back to top

Binding Data to Shape Maps

When you create a shape map, you can make it bound with a data resource such as a query, an imported SQL so as to show values on the areas.

  1. In the Shape Map Editor, select Bind Data on the toolbar, or select Menu > Insert > Bind Data. The Shape Map Data Binding Wizard appears.
  2. In the Data screen, select the data resource in the current catalog you want to bind with the shape map.

    Shape Map Data Binding Wizard - Data

    If the predefined data resources are not what you want, you can select the first item in the corresponding resource node to create one. When a query is selected, you can select the Edit button to modify the query. Then a new dataset based on the selected data resource is created in the page report.

    If you want to use an existing dataset in the current page report for the shape map, select the More Options button and then:

    • Select the Existing Dataset radio button and select a dataset. You can select the Edit button to modify the selected dataset in the Dataset Editor, or select the <New Dataset...> item to create a new dataset in the page report to use. It is always better to use an existing dataset rather than create a new one. Even when the two datasets are based on the same query, Logi Report will still run the query separately for each dataset.
    • Select the Current Dataset radio button to make the shape map inherit the dataset from its parent.
  3. In the Group screen, add a field as the group-by field to group data of the specified dataset. You can add only one group for the dataset. You can specify the sort manner, special function, Select N condition and filter condition on the group respectively. For details about these group features, see the related topics in Grouping the Data in Tables.

    Shape Map Data Binding Wizard - Group

  4. In the Summary screen, add summaries to calculate data based on the specified group. To add a summary, select a field in the Resources box and select Add button, then from the Aggregate Function drop-down list, select the function as required. Data in each group will then be calculated based on the added field using the specified function, and the summary result will be displayed accordingly on map areas the names of which match with values of the group-by field. When DistinctSum is selected as the aggregate function, you should select Choose button in the Distinct On text box to specify one or more fields according to whose unique values to calculate DistinctSum in the Select Fields dialog.

    Shape Map Data Binding Wizard - Summary

    The summaries created from the Summary screen will be added to the current catalog as static summaries.

  5. In the Filter screen, add filter conditions on the group-by field and the summaries to reduce data displayed on the map areas. For how to define a filter, go here.

    Shape Map Data Binding Wizard - Filter

  6. Select Finish to apply the settings and leave the dialog.

Back to top

Adding Conditional Formats to Shape Map Areas

When a shape map is bound with data, you can add conditional formats to the map areas, then when a specified condition is fulfilled, the format defined on the condition will be applied to the map areas automatically. This is very useful to highlight values that might need to be acted on by the end user.

  1. In the Shape Map Editor, select the Conditional Formatting button Conditional Formatting button on the toolbar, or select Menu > Format > Conditional Formatting. The Shape Map Area Conditional Formatting dialog appears.

    Shape Map Area Conditional Formatting dialog

  2. Select the Add button below the Map Area Condition box. The Edit Conditions dialog appears.

    Edit Conditions dialog

  3. Select the Add Condition button to add a condition line.
  4. From the field drop-down list, select the field on which the condition will be based.
  5. Choose the operator with which to compose the condition expression from the operator drop-down list.
  6. Select Choose button next to the value box to specify the value of how to build the condition. You can also type in the value manually.

    This image notes any new content for version 17 of the product. For more information please see the Release Notes or What's New topics.You can specify an empty string as the value for a field of String type, by simply leaving the text box blank (value length=0).

  7. Select Add Condition to add more condition lines and define the logic between the condition lines.

    To make some condition lines grouped, select them and select the Group button, then the selected condition lines will be added in one group and work as one line of filter expression. Conditions and groups together can be further grouped. To take any condition or group in a group out, select it and select Ungroup.

    To adjust the priority of the condition lines, select it and select the Up or Down button.

    To delete a condition line, select it and select the Delete button.

  8. Select OK to save the condition.

    The newly added condition is then displayed in the Map Area Condition box in the Map Area Conditional Formatting dialog.

  9. In the Format box of the Map Area Conditional Formatting dialog, set the format which will be applied to the specified map areas when the specified condition is fulfilled, including the fill color, border color, border style, and border width.
  10. Repeat the above steps to add more conditions and define the format for each condition.

    To edit a condition, select the condition from the Map Area Condition box, select the Edit button, then edit the condition in the Edit Conditions dialog.

    To adjust the priority of the conditions, select a condition and select the High or Low button.

    To remove a condition and the corresponding format, select the condition from the Map Area Condition box and then select the Remove button.

  11. Select OK to save and apply the settings.

Back to top

BackPrevious Topic Next TopicNext