Professional Documents
Culture Documents
There is a known problem that can result in maps inserted into reports not appearing in the report viewer and appearing in the Excel workbook as icons with the name and path of the linked file underneath. This is a result of an interaction with a setting in Microsoft Office Picture Manager. For instructions for changing this setting so that the maps appear correctly, see Changing the Microsoft Office Picture Manager Settings.
Apart from changing the name of the app pack itself and the report, we have added the following: A ShowAllTabs field (which is set to True) to the Report element. This indicates that when users run the report we want them to see a tab for all of the worksheets in the workbook that are not hidden. A Maps element with its ImageDirectory field set to Analyzer://Reports/images. The maps are inserted into the report as bitmaps and this is where they will be stored.
A single Map element, which has two child Layer elements. Each of these specifies a single attribute to be displayed on the map and for the ServRxQualSub attribute we have set the ZoomTo field to True, indicating that we want the map to zoom to this layer. This effectively results in a "best fit" operation on the drive test route within the map window.
Save the app pack XML file as MyKPIReport Map App Pack.xml in the Reports folder within the user data area. For example: C:\Documents and Settings\All Users\Application Data\Actix\Analyzer\Reports Copy the Excel workbook, rename it to MyKPIMapReport.xls and place it in the same folder we used in that topic: C:\Documents and Settings\All Users\Application Data\Actix\Analyzer\Reports\MyKPIReport
However, because we now have a Maps node in our app pack XML file, running the report should have generated the bitmaps for our map. Using Windows Explorer, browse to the folder specified in the ImageDirectory field on the Maps element. This should reveal two bitmap files, one representing the map and the other the legend.
C:\Documents and Settings\All Users\Application Data\Actix\Analyzer\Reports\Images Select the RxQual_Drops_map.bmp file and then click Insert.
Back on the Create from File tab, select Link to file and deselect Display as icon. Click OK.
If the map appears as an icon with the name and path of the linked file underneath, see Changing the Microsoft Office Picture Manager Settings. If necessary, resize the image to suit your requirements. Select the image, right-click and choose Format Object from the shortcut menu. This opens the Format Object dialog. This has a number of options, which you can use to add borders and specify various other types of formatting. Most of these are fairly straight forward and in this example, we will simply set the size options, because it is important to understand how these work and interact with the app pack mechanism. But first you need to understand the following: New map and legend bitmaps are generated for each Map node in the XML every time the report is run (provided it is run through the app pack mechanism). The new bitmaps overwrite those that were written the last time the report was run. The size of the map bitmaps will reflect the size of the map window at the time that the report is run. If the map window is closed when the user runs the report, it will be reopened using the stored size settings.