Starting Your Dynamic Report

Contents

The standard way of displaying an InstantAtlas dynamic report is to open or link to the atlas.html file. However, this method doesn’t work if the report is saved on a local or shared drive due to security restrictions in modern Internet browsers.

This page describes two main ways to open and display locally saved dynamic reports despite these restrictions: opening the report using the atlas-launch.html file or setting up a local webserver.

image7 Please note that your dynamic report must first be extracted from the zip archive before you can view it using one of the solutions below.

Using the atlas-launch.html

Each InstantAtlas Desktop report published with version 6.12.0 includes an ‘atlas-launch.html’ file. This file can be used to open the dynamic report while it is saved at a local destination e.g. your C drive. The atlas-launch.html file uses local variants of some of the report files. These are:

File for use on a webserver File variant for local use
config.xml config-vars.xml.js
data.js data-vars.js.js
map.js map-vars.js.js
a file for each base geography containing the feature geometry information e.g. _post_code_sectors.shp1.js _post_code_sectors-vars.shp1.js
a file for each contextual geography containing the feature geometry information e.g. contextualLayer1.js contextualLayer1-vars.js.js

image7 Please note that while you are designing your dynamic report, you need to ensure that the two variants of the same file stay in sync, meaning any changes you make to a file in the left column of the above table will also need to be made to the respective variant file in the right column.

If you edit the config.xml file using the InstantAtlas Designer, your changes will automatically be saved into both the config.xml file as well as the config-vars.xml.js. Similarly, if you export your data using the latest Excel or Access Data Manager, both variants of the data.js file are created. If you edit any of the above files using a text editor, you will either need to make the same changes in the respective variant file(s) or you can use a command line tool called iapackager to create the variant files for local use (recommended).

If you have a dynamic report that was published with an older version of the InstantAtlas Desktop Publisher you can also use the iapackager tool to create the variant files for local use.

Limitations

There are a few situations where using the atlas-launch.html file will not work as well as when the report is viewed via a webserver:

  • Reports using a background image collection will not display that background layer in the locally opened version of the report.
  • Reports containing the Feature Card component will not be able to load the snippet.html file. The report will work but the feature card will display the path to the snippet file instead of rendering the HTML content when the report is opened locally. A workaround for this would be to add the snippet code directly into the ‘HTML snippet’ property in the Designer.
  • Reports with very large data files may take longer to load as all data must be stored in a single data file for local viewing.
  • Downloading the full report, or some individual components such as the map or legend as images, does not work in locally opened reports.
  • Some complex report setups are not supported with this solution, e.g. where additional custom JavaScript files are called.
  • Reports published using the Batch Publisher will not automatically contain the atlas-launch.html file and associated local file variants. You can use the iapackager tool to create these for each report folder.

Using a local webserver

An alternative to using the atlas-launch.html file is to open and display a locally saved dynamic report by using a local webserver. There are a few ways to set up a local webserver and run the reports via ‘localhost’. This section describes two methods that are quick and easy to set up (but it will be up to your IT department to decide which of these is best for you).

Web Server for Chrome

This is an extension to the Google Chrome browser which allows you to open your report as if it was served via a web server: https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en

After you install the extension you will need to launch the app and specify a folder which will be the root folder of your local webserver. The localhost link to this folder is displayed as an IP address in the app’s dialog. Click on it to see the folder’s content in a Chrome browser window. Now browse to the ‘atlas.html’ file of your report and click on it to open the report.

image27 Tip: You can set the app to ‘Run in background’ and ‘Start on login’ which means the localhost link will work even when the app dialog is closed.

Http server using node.js

Information about this option can be found at https://www.npmjs.com/package/http-server

The steps to set it up are:

  • Download node.js from here: https://nodejs.org/en/download/ and install it.
  • Run node.js – a command line window appears
  • Type npm install --global http-server and hit enter
  • Close node.js
  • Create a text file and enter http-server --cors -o
  • Save text file as *.bat e.g. ‘my-server.bat’ into the folder you wish to be the root of your web server.
  • Double-click the batch file to open a browser window showing the folder content.
  • Browse to the atlas.html file and click on it to open it – report will open in a web browser.

There are also other ways to set up a local webserver e.g. using Internet Information Services (IIS).

Please remember that these solutions are only necessary in order to view dynamic reports saved on a local or network drive. Once the report has been copied to the server hosting your website, end-users will be able to view the report directly in their web browser without any additional steps.