[Table.WorldMap:]
Inserts a World map into the report based on the previous table. Currently only works in Report Studio.
Purpose
Inserts a World map into the report based on the previous table, which must contain a column called CountryCode (2-letter ISO code), followed by Link (only in HTML output, to click on the map), HoverText (only in HTML output, for the tooltip), and Color (any output type) specified as a hex code (e.g. #ff0000) or a standard CSS colour (e.g. lightblue).
Macro Compatibility
The macro can be used in the highlighted input document types only. A greyed-out icon indicates not supported.
Parameter | Type | Presence | Purpose | Options | Default |
---|---|---|---|---|---|
String | Optional | The colour for the oceans. | N/A | #ffffff | |
String | Optional | Add a comment to make your document template more readable. The comment is discarded in the output document. | N/A | N/A | |
String | Optional | The default color for countries | N/A | #b9b9b9 | |
Boolean | Optional | Whether to delete the last table |
|
false | |
Boolean | Optional | Should NCalc expression evaluation throw error on Overflow |
|
true | |
String | Optional | The text to display should the macro fail to execute. Note that a poorly-specified macro (e.g. omitting mandatory parameters) will still result in an error message. | N/A | N/A | |
String | Optional | The condition that must be true in order for the macro to be executed/evaluated. Must either evaluate to true or false, for example: "3+5=8" or "contains('abcd', 'z'). | N/A | true | |
MacroMode | Optional | The mode in which variables are stored. In the legacy mode (default for Schedules), the variable created is a string and formatted. In the normal mode (default for Report Studio), the output variable is stored as a strongly-typed object, e.g. an Int32 or a List |
|
Legacy | |
ObfuscationType | Optional | Obfuscation type. Use obfuscation to write reports where sensitive data is hidden. When used, ReportMagic guarantees that the same input string will map to the same output string for the whole of the report (but the next time the report runs, it will most likely map to a different value). If you use obfuscation, the property in your macro will not show up and instead, you will see a fake item of the obfuscation type chosen. |
|
None | |
Double | Optional | How much of the page width to fill |
|
100 | |
String | Optional | If specified, adds a warning message for this macro. This is processed as an NCalc, and the warning message will ALWAYS be present and will be the value of the evaluated NCalc expression. | N/A | N/A |
Examples (2)
Example 1:
Display the world map with oceans in light blue, full width of the page and delete the table afterwards.Also highlight the UK (country code GB) in red and include a clickable URL and hover text (tooltip):
<table> <thead> <tr> <td>CountryCode</td> <td>Link</td> <td>HoverText</td> <td>Color</td> </tr> </thead> <tbody> <tr> <td>GB</td> <td>https://reportmagic.net</td> <td>Here is the hover text</td> <td>Red</td> </tr> </tbody> </table> [Table.WorldMap: backgroundColor=lightblue, pageWidthPercent=100, deleteTable=true]
Example 2:
Display the world map with countries in white by default, 50% of the page, and don't remove the table.
[List.Table: values=CountryCode^Link^HoverText^Color;GB^https://reportmagic.net^Here is the hover text^Red] [Table.WorldMap: defaultCountryColor=#ffffff, pageWidthPercent=50, deleteTable=false]