swngl05 Report post Posted February 20, 2008 Hi, 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, Prem Share this post Link to post Share on other sites
Arindam Report post Posted February 21, 2008 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
ujval_l Report post Posted November 27, 2008 Hi 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 Umesh Share this post Link to post Share on other sites
Arindam Report post Posted November 27, 2008 Hi, Please follow this link. http://www.fusioncharts.com/docs/Contents/FirstChart.html Share this post Link to post Share on other sites
ujval_l Report post Posted November 28, 2008 Hi 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 Ujval Share this post Link to post Share on other sites
Arindam Report post Posted November 28, 2008 (edited) Hi, 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? http://www.fusioncharts.com/docs/Contents/CS_DB.html Please follow this code: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,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="http://www.macromedia.com/go/getflashplayer" /> </object> 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 //Default.aspx. //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()); } oRs.ReadData.Close(); //Close chart element xmlData.Append("</chart>"); //Set Proper output content-type Response.ContentType = "text/xml"; //Just write out the XML data //NOTE THAT THIS PAGE DOESN'T CONTAIN ANY HTML TAG, WHATSOEVER Response.Write(xmlData.ToString()); } } 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 November 28, 2008 by Guest Share this post Link to post Share on other sites
ujval_l Report post Posted November 28, 2008 Thanks For Providing The Information Share this post Link to post Share on other sites