I would like to discuss a simple example that uses IBM Cognos Mashup Service (CMS) to create a Mashup of my IBM Cognos reports, and the ubiquitous web application used in Mashups, Google Maps. This Mashup demonstrates how easy it is to integrate IBM Cognos content into any web application. Mashing up IBM Cognos business intelligence (BI) with other applications can provide a more useful user experience, putting the BI within the context and user interface of another application, right at the “point of impact”, and avoids the need to switch to another application to make fully informed decisions.
Watch the video of the Mashup in action here.
There are a few points worth noting in this demonstration. First, the Mashup uses CMS to access the “Branches” report resource in XML form, so that the data values are readily available to pass to the Google maps API’s for geocoding. This is robust, and avoids fragile, workaround techniques like HTML scraping. The XML format is called layoutDataXML (LDX), and is fully documented in the CMS Developer Guide. Second, the “Branch Details” report resource is requested in HTML fragment form, so CMS transforms the LDX into a HTML fragment, suitable for insertion into a <div> element of an HTML page, before returning the resource. Finally the Mashup uses another resource type, the cognosURL resource to leave the Mashup application and launch another web browser to open the same “Branch Details” report in the full Cognos Viewer user interface.
I like how easy it is to make requests for BI resources to include in the Mashup application. Resources are also available in JSON format from CMS.
This example amounts to a little more than 200 lines of JavaScript HTML. The code related to making calls to the CMS REST interface is easy to create.
In this video, I explain the construction of the REST URL references to IBM Cognos report objects.
I hope that this example helps you to think of ways that your applications can integrate with IBM Cognos to deliver business intelligence right where it is needed most. I look forward to seeing other applications that apply IBM Cognos Mashup Service.
If you would like to see the complete code for this example, you can download the html file with this code here. This sample was created using IBM Cognos 8.4.1. The reports are written using Report Studio with the “Go Data Warehouse (analysis)” sample package.
For information on how to use the Google maps API please visit http://code.google.com/intl/en/apis/maps/