fyiReporting Software, LLC
Home
Products
Downloads
Forum
Release Notes
Report Topics
DataSets
Data Sources
Expressions
Overview
Functions
Report Parameters
Report Items
Chart
Image
List
Matrix
Rectangle
Subreport
Table
Textbox
Designer
Overview
How do I?
Create a New Report
Create a Table
Graph data
Cross tabulate data
Do Labels
Options
Menus
File
Edit
View
Data
Format
Tools
Window
Help
Error Handling
Examples
ASP.NET
Code Examples
RDL Examples
RdlViewer
Desktop Server
Command Line Utility
Chart Map Designer

MapFile Designer

The MapFile Designer (RdlMapFile.exe) is an editor for creating templates for use with Charts of type Map. The xml map file created must be placed in the same directory as the RdlEngine.dll file to be usable at runtime. When you define the Chart in the RDL Designer you should specify the file name without path or extension of the map file. In the RDL Designer Tool/Options menu you can define which templates are shown during the design experience.

Screen shot of the MapFile designer with a polygon representing "Texas" selected.

fyiReporting MapFile Designer

How to create a new map

  1. Click the File/New menu item. This will clear out the previous map and start a new one.
  2. There are a couple of helpers for building a new map.
    1. Use the File/Import... menu item if you have a shapefile for the region you're interested in. For example, this US government weather site points to a shapefile that might be used as a starting point for a United States map. Only polygons are imported from the shapefile so you may not see what you expect after the import depending on the contents of the shapefile.
    2. If you have an image file that approximates the design of the map select Edit/Set Background Image... to set it. You can then use that as a guide in creating the text, lines and polygons that will make up the map. Note: the background image is only used during the design of the map and is not saved as part of the xml file.
  3. Select the tool you want and start designing. You will be able to undo changes you make as you go so feel free to experiment with the tool.
  4. Save the MapFile. The MapFile is a XML file representing the objects of the map. The file should be placed in the same directory as the RdlEngine.dll file for the runtime map charts to be found.
  5. In the RDL Designer you need to add the MapFile to the known Map types. In the RDL Designer, click on the Tools/Options menu item and then activate the Map tab. Use the Add button to add the new file to the list.
  6. You can now create a new Chart with type Map and subtype of the file name (sans path and extension) you just created.

Tool support

Selection
Click on a line, polygon or text object to select it. The property sheet will change to reflect the new selection. When there are overlapping objects keep clicking to drilldown on more recent objects. If the Ctrl key is down the item selected will be added to the selection list if not already selected. If already selected, the item will be deselected. The Tab and Shift+Tab (Backtab) keys will also select items. Once selected items maybe moved by dragging them with the mouse. The arrow keys (left, right, up, down) may also be used to move any selected item(s) in respective directions.
Insert Line
To create a new line first click in the position for one end of the line. Then click on the second point of the line. Succesive clicking will change the location of the second end point. Hit the Escape key or select a tool to end creating the line.
Insert Polygon
To create a new polygon click multiple times to define a point in the polygon. If you make a mistake use Ctrl+Z to undo the last point created. Hit the Escape key or select a tool to end creating a polygon. Once selected you can specify keys that will be used by the charting engine to identify a polygon in the property sheet. For example, for a polygon representing the US you might have keys of "US", "USA", "United States". Note: don't specify a fill color if you're planning to have this polygon color filled in by the chart.
Insert Text
To create a new Text item click in the designer. A new Text item will be created. Use the property sheet to change the value of the text. Successive clicking will create multiple Text items.
Mouse Wheel
Use the mouse wheel to scroll up and down with the view area. If the Ctrl key is pressed while using the mouse wheel the view will be zoomed. If you click and hold the mouse wheel you can scroll left, right, up and down within the view window.

Using the MapFile in the RDL Designer

This report shows a Chart Map with subtype "usa_map" being previewed.

MapFile previewed in RDLDesigner

It is defined as follows:

The GetRangeColor is a local VB function defined as
Public Function GetRangeColor(sum as double) as String 
  dim color as String  
	if sum < 175 Then 
		color = "red"
	elseif sum < 200 Then 
		color = "#00ff00" 
	elseif sum < 225 Then 
		color = "blue" 
	elseif sum < 250 Then 
		color = "yellow" 
	elseif sum < 275 Then 
		color = "orange" 
	else 
		color = "pink"
	end if
   return color
End Function

Copyright © 2005-2008 fyiReporting Software, LLC.   All Rights Reserved.