Changed report format JSAPI

Replaced JSAPI to allow exporting to other formats.  This has been
tested on desktop browsers (IE, FF, Chrome, Safari).  Will need to
enable popups in example app