PDF and Excel report formats
In this topic
- Browser canvas rendering
- Internet Explorer Quirks rendering
- View and print a map-enabled report in a different format
- Troubleshooting
Map-enabled reports can be viewed and printed in PDF and Excel report formats.
Viewing and printing maps in PDF and Excel report formats requires that the following work together:
- Web server (with proxy)
- EM4C Server
- IBM Cognos Server
To ensure that maps are successfully generated in PDF and Excel documents, it is essential that each of these servers is configured to detect and communicate with the others. Esri Maps for IBM Cognos supports viewing and printing maps in PDF and Excel report formats by generating an image of the map that is included in the output report. The exact process by which this occurs depends on the mode of the client's web browser.
Browser canvas rendering
When a user activates the PDF or Excel report format option in any browser other than Internet Explorer Quirks mode (see the following section), a hidden canvas is created from JavaScript code. The canvas is used to hold the map image created from images fetched from ArcGIS.
Because the canvas has a limitation that makes it unable to perform cross-domain requests for images, the browser must use a proxy on the web server to fetch the images from ArcGIS, send the generated map image to EM4C Server, and serve the PDF or Excel document containing the map back to the browser. The following diagram illustrates the map image generation process.
As the diagram shows, once the canvas is created in the browser, the browser makes a call to the proxy on the web server, which in turn sends a call to ArcGIS to fetch the images. After the images are returned and added to the canvas and the map image is serialized, the image is sent to EM4C Server via the application gateway (em4c.cgi) on the web server and saved there. The browser then makes a request to the IBM Cognos Server for a PDF or Excel document, depending on the format chosen by the user. The IBM Cognos Server fetches the map image from EM4C Server (via the proxy) and the PDF or Excel document containing the map image is served to the browser for display and printing.
Note:
- In PDF and Excel 2007 documents, the map image is defined as a URL in the document generated on the IBM Cognos Server. The URL points to EM4C Server (via the proxy), which retrieves the image and embeds it in the document. For Excel 2002 documents, the image link in the spreadsheet points to the proxy (web server); the image is not embedded.
- A similar process applies when users activate the Take snapshot tool. The map image is created in the same way as described above and saved to EM4C Server. A URL points to the image and the image is displayed in a browser window.
Internet Explorer Quirks rendering
Quirks mode is a document rendering mode available in Internet Explorer (IE). Quirks mode is used to emulate the rendering behavior of IE 5 to properly display web pages developed before the implementation of modern HTML and CSS specifications.
Note:
Quirks mode is the name of the document mode in IE 8 and 9. In IE 10, the equivalent document mode is called IE 5 Quirks; in IE 11, it is called 5. To see which mode is being used to render a web page in IE, press the F12 key to open the IE developer tool.
The browser canvas element described in the previous section is not present in IE Quirks mode. Instead, a canvas is generated on EM4C Server to hold the images and create the map image. The following diagram illustrates the map image generation process.
When a user activates the PDF or Excel report format option in Internet Explorer Quirks mode, the browser sends a text-based representation of the map to the application gateway (em4c.cgi) on the web server, which then sends a call to EM4C Server to generate the canvas inside a server instance. EM4C Server fetches the images from ArcGIS via the proxy on the web server, and the images are combined into a single map image and saved to EM4C Server. From this point, the PDF and Excel document creation process is the same as the one described in the previous section for browser canvas rendering.
View and print a map-enabled report in a different format
Map-enabled reports can be viewed and printed in PDF and Excel report formats once the report has been run in HTML.
- Run the report in HTML.
- Click the View in HTML Format button.
- Select the desired output format.
- Print the output document if desired.
Note:
To enable map printing, the IBM Cognos Dispatcher must be able to access the EM4C Gateway (em4c.cgi). In a multigateway installation, the IBM Cognos Dispatchers must be able to access all of the EM4C Gateways.
Note:
Reports viewed in the Excel 2002 report format reference map images that are saved on EM4C Server. These images are not deleted automatically to ensure that the referenced images exist. It is recommended that you monitor the size of this folder and remove images as necessary.
Troubleshooting
For assistance in troubleshooting problems with viewing reports in PDF or Excel format, see Troubleshooting: View as PDF or Excel.