Sign in to follow this  
jerrym

XML data file error - using ASP Class method

Recommended Posts

i'm hopin someone can help me with this the error i'm getting is;

===

Error Type:

Microsoft VBScript runtime (0x800A01C2)

Wrong number of arguments or invalid property assignment

/Tracking4/FusionCharts/Includes/FusionCharts_Gen.asp, line 1012

===

the xml data file code is;

===

<%@LANGUAGE="VBSCRIPT"%>

<% option explicit %>

<%

  'We've included ../Includes/DBConn.asp, which contains functions

  'to help us easily connect to a database.

%>

  <!--#include file="../Includes/DBConn.asp"-->

  <%

'We've included ../Includes/FusionCharts_Gen.asp, which FusionCharts ASP Class to help us easily embed the charts.

 

  %>

  <!--#include file="../Includes/FusionCharts_Gen.asp"-->

  <%

'This page generates the XML data  

Dim FC

' Create FusionCharts ASP class object

set FC = new FusionCharts

' Set chart type

Call FC.setChartType("MSComlumnLine3D")

' Set Relative Path of swf file.

Call FC.setSWFPath("../FusionCharts/")

' Define chart attributes

 Dim strParam

strParam="caption=Sales Comparison; xAxisName=Month; yAxisName=Sales;showBorder=1; formatNumber=1; formatNumberScale=0; decimals=0"

'Set chart attributes

Call FC.setChartParams(strParam)

 

' Fetch data records using SQL Query

Dim strQuery

strQuery = "select Month, SalesCY, SalesLY from SalesByMonthCYLY"

Dim oRs

'Create the recordset to retrieve data

Set oRs = Server.CreateObject("ADODB.Recordset")

Set oRs = oConn.Execute(strQuery)

'Pass the SQL Query result to the FusionCharts ASP Class function

If Not oRs.bof Then

 Call FC.addDataset("SalesCurrYr","")

 Do while Not oRs.eof

 Call FC.addCategory(oRs("Month"),"", "")

 Call FC.addChartData(oRs("SalesCY"), "", "")

 oRs.MoveNext

 Loop

 

 Call FC.addDataset("SalesLastYr","")

 oRs.MoveFirst

 Do while Not oRs.eof

 Call FC.addChartData(oRs("SalesLY"), "", "")

 oRs.MoveNext

 Loop

End If

oRs.Close

set oRs=Nothing

'Set Proper output content-type

Response.ContentType= "text/xml"

'Just write out the XML data

Response.Write(FC.getXML())

  %>

===

Share this post


Link to post
Share on other sites

Hi,

Could please use correct chart type? Could you please use this FusionCharts_Gen.asp? see attachment.

Your code:

' Set chart type

Call FC.setChartType("MSComlumnLine3D")

Correct code:

' Set chart type

Call FC.setChartType("MSColumnLine3D")

also add

call FC.setSize("600","400")

FusionCharts_Gen.zip

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