﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>FusionCharts Forum / FusionCharts v3 / Using FusionCharts / FusionCharts and ASP  / Error in loading data / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>FusionCharts Forum</description><link>http://www.fusioncharts.com/forum/</link><webMaster>support@fusioncharts.com</webMaster><lastBuildDate>Wed, 03 Dec 2008 02:17:10 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Error in loading data</title><link>http://www.fusioncharts.com/forum/Topic965-30-1.aspx</link><description>Can you try switching the debug mode of chart on and clicking on the dataURL link?</description><pubDate>Fri, 04 May 2007 01:38:46 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>Error in loading data</title><link>http://www.fusioncharts.com/forum/Topic965-30-1.aspx</link><description>I am using two pages to grab and display the data. The first page is launched and it then pulls the data from the second "data" page. I'm using the MSColumn3D.swf chart. &lt;/P&gt;&lt;P&gt;[code]dim stats&lt;BR&gt;dim rs&lt;BR&gt;dim sql&lt;BR&gt;dim cn&lt;/P&gt;&lt;P&gt;dim rs1&lt;BR&gt;dim sql1&lt;BR&gt;dim cn1&lt;/P&gt;&lt;P&gt;dim field1 'Hold data returned&lt;BR&gt;'dim field2 'Hold name&lt;BR&gt;dim strXML 'strXML will be used to store the entire XML document generated&lt;/P&gt;&lt;P&gt;&lt;BR&gt;'Default.asp has passed us a property animate. We request that.&lt;BR&gt; Dim animateChart&lt;BR&gt; animateChart = Request.QueryString("animate")&lt;/P&gt;&lt;P&gt;'Set default value of 1&lt;BR&gt; if animateChart="" then&lt;BR&gt;      animateChart = "1"&lt;BR&gt; end if&lt;/P&gt;&lt;P&gt;'Make db conx&lt;BR&gt;cn = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=serverip;DATABASE=netops;USER=root;PASSWORD=password;OPTION=3"&lt;BR&gt;set rs = server.createobject("adodb.recordset")&lt;BR&gt;sql = "SELECT Count(Ticket) as field0 FROM Tkt_tickets WHERE YEAR(ResolvedTime) = 2006 GROUP BY Year(ResolvedTime), Month(ResolvedTime)"&lt;/P&gt;&lt;P&gt;cn1 = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=serverip;DATABASE=netops;USER=root;PASSWORD=password;OPTION=3"&lt;BR&gt;set rs1 = server.createobject("adodb.recordset")&lt;BR&gt;sql1 = "SELECT Count(Ticket) as field1 FROM Tkt_tickets WHERE YEAR(ResolvedTime) = 2007 GROUP BY Year(ResolvedTime), Month(ResolvedTime)"&lt;/P&gt;&lt;P&gt;'Start XML data&lt;BR&gt;strXML = "&amp;lt;chart caption='Tickets Worked Results 2006 v 2007' xAxisName='Month' yAxisName='Revenue' showValues='0' numberPrefix='$'&amp;gt;&lt;/P&gt;&lt;P&gt;strXML = strXML &amp;amp; "&amp;lt;categories&amp;gt;"&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;category label='Jan' /&amp;gt;"&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;category label='Feb' /&amp;gt;"&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;category label='Mar' /&amp;gt;"&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;category label='Apr' /&amp;gt;"&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;category label='May' /&amp;gt;"&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;category label='Jun' /&amp;gt;"&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;category label='Jul' /&amp;gt;"&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;category label='Aug' /&amp;gt;"&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;category label='Sep' /&amp;gt;"&lt;BR&gt;    strXML = strXML &amp;amp; "&amp;lt;category label='Oct' /&amp;gt;"&lt;BR&gt;    strXML = strXML &amp;amp; "&amp;lt;category label='Nov' /&amp;gt;"&lt;BR&gt;    strXML = strXML &amp;amp; "&amp;lt;category label='Dec' /&amp;gt;"&lt;BR&gt;strXML = strXML &amp;amp; "&amp;lt;/categories&amp;gt;" &lt;/P&gt;&lt;P&gt;'Open db and grab 2006 records&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;dataset seriesName='2006' color='FF9601'&amp;gt;"&lt;BR&gt; rs.open sql, cn&lt;BR&gt;    do while not rs.eof&lt;/P&gt;&lt;P&gt;'Write the data line&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;set value='" &amp;amp; rs("field0") &amp;amp; "'/&amp;gt;"&lt;/P&gt;&lt;P&gt;'Go to next record&lt;BR&gt;    rs.movenext&lt;BR&gt;    loop&lt;/P&gt;&lt;P&gt;strXML = strXML &amp;amp; "&amp;lt;/dataset&amp;gt;"&lt;/P&gt;&lt;P&gt;'Open db and grab 2007 records&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;dataset seriesName='2007' color='0000C0'&amp;gt;"&lt;BR&gt; rs1.open sql1, cn1&lt;BR&gt;    do while not rs1.eof&lt;/P&gt;&lt;P&gt;'Write the data line&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;set value='" &amp;amp; rs1("field1") &amp;amp; "'/&amp;gt;"&lt;/P&gt;&lt;P&gt;'Go to next record&lt;BR&gt;    rs1.movenext&lt;BR&gt;    loop&lt;/P&gt;&lt;P&gt; strXML = strXML &amp;amp; "&amp;lt;/dataset&amp;gt;"&lt;/P&gt;&lt;P&gt;    strXML = strXML &amp;amp; "&amp;lt;trendlines&amp;gt;"&lt;BR&gt;     strXML = strXML &amp;amp; "&amp;lt;line startValue='26000' color='91C728' displayValue='Target' showOnTop='1'/&amp;gt;"&lt;BR&gt;    strXML = strXML &amp;amp; "&amp;lt;/trendlines&amp;gt;"&lt;/P&gt;&lt;P&gt;'Finally, close &amp;lt;chart&amp;gt; element&lt;BR&gt; strXML = strXML &amp;amp; "&amp;lt;/chart&amp;gt;"&lt;/P&gt;&lt;P&gt;'Close loops and conx&lt;BR&gt; rs.close&lt;BR&gt;Set rs = nothing&lt;BR&gt; rs1.close&lt;BR&gt;Set rs1 = nothing&lt;/P&gt;&lt;P&gt;'Set Proper output content-type&lt;BR&gt; Response.ContentType = "text/xml"&lt;/P&gt;&lt;P&gt;'Just write out the XML data&lt;BR&gt;'NOTE THAT THIS PAGE DOESN'T CONTAIN ANY HTML TAG, WHATSOEVER&lt;BR&gt; Response.Write(strXML)&lt;BR&gt;[/code]&lt;/P&gt;&lt;P&gt;This is in the first page.&lt;/P&gt;&lt;P&gt;[code]'Variable to contain dataURL&lt;BR&gt; Dim strDataURL&lt;/P&gt;&lt;P&gt;'Set DataURL with animation property to 1&lt;BR&gt;'NOTE: It's necessary to encode the dataURL if you've added parameters to it&lt;BR&gt;   strDataURL = "TktByMonthData.asp"&lt;/P&gt;&lt;P&gt;'Create the chart - Pie 3D Chart with dataURL as strDataURL&lt;BR&gt;   Call renderChart("Includes/ChartsSWF/MSColumn3D.swf", strDataURL, "", "stats", 600, 400, false, false)[/code]&lt;/P&gt;&lt;P&gt;Any help would be a&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;ppreciated&lt;/SPAN&gt;.</description><pubDate>Thu, 03 May 2007 21:47:00 GMT</pubDate><dc:creator>djjwp</dc:creator></item></channel></rss>