Nisus Report post Posted January 5, 2011 Hi, I am trying to see the example given form fusionchart for asp.net c#.I have changed the connection settings in to SQL server everything seems ok but having a problem with data reader.Please see the attached file. Here is the code. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using DataConnection; using InfoSoftGlobal; using System.Data.SqlClient; public partial class User_Chart : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { // Generate chart in Literal Control FCLiteral.Text = CreateChart(); } public string CreateChart() { DbConn oRs; string SqlQuery; string strXML; //Generate the graph element strXML = "<graph caption='Factory Output report' subCaption='By Quantity' decimalPrecision='0' showNames='1' numberSuffix=' Units' pieSliceDepth='30' formatNumberScale='0'>"; SqlQuery = "select * from Factory_Master"; oRs = new DbConn(SqlQuery); //Iterate through each factory while (oRs.ReadData.Read()) { //Generate <set name='..' value='..' /> strXML += "<set name='" + oRs.ReadData["MonthShortName"].ToString() + "' value='" + oRs.ReadData["uUnits"].ToString() + "' />"; } oRs.ReadData.Close(); //Finally, close <graph> element strXML += "</graph>"; //Create the chart - Pie 3D Chart with data from strXML return FusionCharts.RenderChart("../FusionCharts/FCF_Column3D.swf", "", strXML, "FactorySum", "600", "350", false, false); } } Waiting for your reply Thanks Share this post Link to post Share on other sites
Sanjukta Report post Posted January 10, 2011 Hi, It seems that the "Factory_Master" table does not exist in the database from where you are retrieving the data to render the chart. Could you please recheck with this? Hope this helps. Share this post Link to post Share on other sites