Sign in to follow this  

Fusion Charts and Cognos

Recommended Posts


I'm working with Cognos tools for the past 2 years. I got in touch with "Fusion Charts Free" when my friend introduced it to me. I'm wondering whether we could use Fusion Charts as a wrapper for Chart Reports in Cognos.

It'll be great if someone could throw some light on whether this is possible and how we could do this.

Any help in this regard will be greatly appreciated

Thanks in Advance

Best Regards,


Share this post

Link to post
Share on other sites

I am afarid we have not yet implemented FusionCharts in Cognos

environment. But to give you some pointers on implementaion, i would say

that FusionCharts needs HTML <oject>/<embed> tags . If Cognoz supprts

using these tags it can be implemented very easily. FusionCharts takes it

data as XML stream.

Share this post

Link to post
Share on other sites


Cognos Supports HTML<object>/<embed>tags.I am using same thing for flash web menus .So if you can provide us how to implement fusion charts in Cognos 8.3 BI application.Aspecially in Report dashboard part.

Best Regards


Share this post

Link to post
Share on other sites


Thanks for your reply.Fusion Charts is using xml file for data storage.I want to retrive the data directly from oracle database using sql query instead of xml file.

Best Regards


Share this post

Link to post
Share on other sites


  FusionCharts does not directly support SQL query. But you can provide a dataURL as an external data source. That URL may be an aspx page or other server side program. This program would fetch data from your database using SQL XML and then converts this XML into FusionCharts XML format. Could you please visit this link for reference?

Please follow this code:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=",0,0,0" width="900" height="300" id="Column3D" >

<param name="movie" value="../FusionCharts/Column3D.swf" />

<param name="FlashVars" value="&dataURL=PieData.aspx">

<param name="quality" value="high" />

<embed src="../FusionCharts/Column3D.swf" flashVars="&dataURL=PieData.aspx" quality="high" width="900" height="300" name="Column3D" type="application/x-shockwave-flash" pluginspage="" />


Creating the data provider page PieData.aspx 

PieData.aspx contains the following code to output XML Data: 

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.Text;

using DataConnection;

public partial class DB_dataURL_PieData : System.Web.UI.Page


  protected void Page_Load(object sender, EventArgs e)


  //This page generates the XML data for the Pie Chart contained in


  //For the sake of ease, we've used an Access database which is present in

  //../App_Data/FactoryDB.mdb. It just contains two tables, which are linked to

  //each other.


  //xmlData will be used to store the entire XML document generated

  StringBuilder xmlData = new StringBuilder();


  //Default.aspx has passed us a property animate. We request that.

  string animateChart;

  animateChart = Request["animate"];

  //Set default value of 1

  if (animateChart != null && animateChart.Length == 0)


  animateChart = "1";


  //Generate the chart element

  xmlData.AppendFormat("<chart caption='Factory Output report' subCaption='By Quantity' pieSliceDepth='30' showBorder='1' formatNumberScale='0' numberSuffix=' Units' animation='{0}'>", animateChart);

  //create recordset to get details for the factories

  string query = "select a.FactoryId, a.FactoryName, sum(b.Quantity) as TotQ from .Factory_Master a, Factory_Output b where a.FactoryId=b.FactoryID group by a.FactoryId, a.FactoryName";

DbConn oRs = new DbConn(query);

  //Iterate through each factory

  while (oRs.ReadData.Read())


  //Generate <set name='..' value='..' />

  xmlData.AppendFormat("<set label='{0}' value='{1}' />",

  oRs.ReadData["FactoryName"].ToString(), oRs.ReadData["TotQ"].ToString());



  //Close chart element


  //Set Proper output content-type

  Response.ContentType = "text/xml";

  //Just write out the XML data






In the above page:

1.We first request the animate property which has been passed to it (from dataURL)

2.We generate the data and store it in xmlData variable

3.Finally, we write this data to output stream without any HTML tags.

When you view this page, you'll get the same output as before.


Edited by Guest

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this