The code segment that I susbect is failing is in the aspx file
<%
=GetFactorySummaryChartHtml()%>I changed the folderstructure somewhat to match my production environment
the root project is c:vs2005fcTest
in c:vs2005fcTestbin fusioncharts.dll and is registered
I created a sub folder c:vs2005fcTestFusionCharts that has this structure
c:vs2005fcTestFusionChartsJSClass
c:vs2005fcTestFusionChartsswf
and all the expected files are there.
I'm sure it's an installation issue I overlooked but what is the question.
here is the vb code I'm using
Imports
InfoSoftGlobalImports
System.TextImports
System.DiagnosticsImports
System.DataImports
System.Data.SqlclientPartial
Class DBExample_BasicDBExampleInherits System.Web.UI.PageDim dbtestmode As String = ""Public Function GetFactorySummaryChartHtml() As StringDim xmlData As New StringBuilder()xmlData.Append(
"<chart caption='Factory Output report' subCaption='By Quantity' pieSliceDepth='30' showBorder='1' formatNumberScale='0' numberSuffix=' Units'>")Dim myCMD As SqlCommandDim dr As SqlDataReaderDim dbConnection As New SqlConnectionDim admconnstr As String = dbtestmode & "AdminDataConnectionString"'create recordset to get details for the factoriesDim sqlstr As String = "select a.FactoryId, a.FactoryName, sum(b.Quantity) as TotQ from factory.dbo.Factory_Master a, factory.dbo.Factory_Output b where a.FactoryId=b.FactoryID group by a.FactoryId, a.FactoryName"TrydbConnection.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings(admconnstr).ConnectionString
myCMD =
New SqlCommand(sqlstr, dbConnection)dbConnection.Open()
dr = myCMD.ExecuteReader()
Do While dr.Read()xmlData.Append(
"<set label='" & dr.GetValue(1).ToString() & "' value='" & dr.GetValue(2).ToString() & "' />")Loop'Close chart elementxmlData.Append(
"</chart>")Catch e As SqlExceptionDim errorMessages As String = ""Dim ii As IntegerFor ii = 0 To e.Errors.Count - 1errorMessages +=
"Location: " & Session("modulename") & System.Reflection.MethodBase.GetCurrentMethod().Name & ControlChars.Cr _&
"Index #" & ii.ToString() & ControlChars.NewLine _&
"Message: " & e.Errors(ii).Message & ControlChars.NewLine _&
"LineNumber: " & e.Errors(ii).LineNumber & ControlChars.NewLine _&
"Source: " & e.Errors(ii).Source & ControlChars.NewLine _&
"Procedure: " & e.Errors(ii).Procedure & ControlChars.NewLineNext iiSession(
"ErrorText") = errorMessagesResponse.Redirect(
"ApplicationEvent.aspx")End TryDebug.Print(xmlData.ToString())
'Create the chart - Pie 3D Chart with data from xmlDataReturn FusionCharts.RenderChart("~/FusionCharts/swf/Pie3D.swf", "", xmlData.ToString(), "FactorySum", "600", "300", False, False)End Function
and the aspx code
<%
@ Page Language="VB" AutoEventWireup="false" CodeFile="BasicDBExample.aspx.vb"Inherits="DBExample_BasicDBExample" %><
html><
head> <title>FusionCharts - Database Example </title><script language="Javascript" src="../FusionCharts/JSClass/FusionCharts.js"></script> <style type="text/css"><!
--body {font-family: Arial, Helvetica, sans-serif;font-size: 12px;}
.text{font-family: Arial, Helvetica, sans-serif;font-size: 12px;}
--></style>< /
head><
body><form id='form1' name='form1' method='post' runat="server"><center> <h2>FusionCharts Database Example (Using dataXML method)
</h2><h4>Click on any pie slice to see detailed data.
</h4><p class='text'>Or, right click on any pie to enable slicing or rotation mode.
<%
=GetFactorySummaryChartHtml()%></p> <br><br> <h5><a href='../default.aspx'>« Back to list of examples</a></h5>< a href='../NoChart.html' target="_blank">Unable to see the chart above?</a></center> </form></
body></
html>

Back to top
MultiQuote