Guest Basundhara Ghosal

VB.Net code giving error: Public member 'setChartType' on type 'FusionCharts' not found

Recommended Posts

Trying to call my first Fusion Chart from VB.Net. I'm getting the error you see on the Subject line, with this code:

 

 

 

 

 

Dim FC As Object = New FusionCharts

 

Dim ds As New DataSet

 

Call FC.setChartType("pie3d")

 

Call FC.setSize("650", "450")

 

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

 

Dim strParam$ = "caption=Factory Output report;subCaption=By Quantity;pieSliceDepth=30;numberSuffix= Units;decimals=0"

 

Call FC.setChartParams(strParam)

 

 

 

Dim Adapter As New SqlDataAdapter

 

Dim strConn As String = ConfigurationManager.ConnectionStrings("LFCS").ConnectionString

 

Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("LFCS").ConnectionString)

 

Dim cmd As SqlCommand = conn.CreateCommand

 

 

 

Adapter = New SqlDataAdapter("vwTest", ConfigurationManager.ConnectionStrings("LFCS").ConnectionString)

 

Adapter.Fill(ds) : Adapter.Dispose()

 

Call FC.addDataFromDatabase(ds, "total", "FactoryName", "", "")

 

ds.Dispose()

 

Call FC.renderChart(False)

 

 

 

 

 

Any ideas?

 

 

 

Also, these are my imports at the top of my CodeBehind:

 

Imports InfoSoftGlobal

 

Imports System.Data.SqlClient

 

Imports System.Data

 

Imports System.Text

 

=======================

 

 

 

Another question: Notice I perform "Dim FC = New FusionCharts"

 

Should that be: "Dim FC As New FusionCharts" ? When I make that change, all references to FC get underlined with a comment that each underline is not a member of 'InfosoftGlobal.FusionCharts.'......so maybe not.

 

 

 

An additional piece of info, that will help you all help me solve this is this:

 

I see I didn't have FusionCharts_Get.asp in my project. I believe that .asp file exposes the FusionCharts class. Or does the "Imports InfoSoftGlobal" do that? So, I put FusionCharts.asp, and FusionCharts_Gen.asp, both in my App_Code folder, but it didn't solve my problem. I'm still getting the same error.

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Thanks for stretching the horizons of FusionCharts and its implementation in various technologies.

You are working in VB.NET but using code that works in Classic ASP. Both are mutually incompatible.

But, the ASP Class is created (compatible with) in Classic ASP (VB) and not compatible with ASP.NET VB. Please read : http://www.beansoftware.com/ASP.NET-Tutorials/Classic-ASP-vs-ASP.NET.aspx, http://www.vbdotnetforums.com/asp-net-general-discussion/38046-asp-classic-vs-asp-net.html etc.

So, VB in Classic is not same as ASP.NET VB. Hence, the code for Classic ASP (VB) wont work in VB.NET.

BOTTOMLINE. The code can not be used in VB.NET. Please understand that it was developed by and for Classic ASP (VB).

There is no concept of user-defined object datatype in Classic ASP. Hence the first error.

Again, "Dim FC As New FusionCharts" this wont work as there is not concept for this.

FusionCharts.asp, and FusionCharts_Gen.asp would work in Classic ASP (VB) implementation and not in ASP.NET VB.

Share this post


Link to post
Share on other sites

Thank you for the reply.

 

I understand.

 

I fought with this issue for quite some time, as I find it hard to believe you folks don't support VB.NET.

 

Do you have any plans on doing so, in the future?

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